Question: Description: Your task is to write a UNIX - like shell program that works in our Linux machine in Lab FH 1 3 3 E

Description:
Your task is to write a UNIX-like shell program that works in our Linux machine in Lab FH 133E. A shell is a command line interface for users.
It accepts user commands and execute them. Under the hood, a shell is just another user program. For examples, /bin/sh,/bin/bash,/bin/tcsh, etc.,
are popular shells in Unix/Linux systems. In this assignment, you will implement your own shell, named as "myshell".
automatically support most Linux shell commands.
pathname environment as you should construct and maintain your own pathname environment in this project.
Part2: Build-in commands:
cd: is a command that changes directories. You should use chdir() system call to achieve it.
path: is not only a command that shows the current command searching pathname environment (if no argument is given), but also a utility to modify the pathname environment.
path (without argument): display the current pathname environment, e.g.,"/bin:/sbin". Note, your shell starts with an empty pathname environment.
path +/abc/def: appends directory "/abc/def" to the end of the pathname environment.
path -/abc/def: removes pathname "/abc/def" from the pathname environment if it exists. Otherwise, do nothing.
quit: a command to terminate your shell.
command.
README and makefile: must be a text file (not a PDF, docx, or rtf).
contribution. If a group member contributes 0%, she or he will receive zero even if the other group partner scores 100%.
Document your design ideas in this README file.
Provide instructions how to compile your code, and how to run your program.
Provide a sample test output (again in text format).
Provide a statement if your code contains any bugs or miss a certain component.
You must provide a makefile such that the grader can compile your code by simply typing "make".
performed via system calls, including open(), close(). The library calls such as fopen(), fread() are not allowed in this project.
Grading criteria:
Please make sure your program compiles, otherwise your submission will not be graded and you will receive zero.
Point deduction rule:
Compile warning: 2 points each.
Minor error: such as not meeting the input/output requirements, or folder name is not compliant with the specification, 5 points each.
Major error: examples include, infinite loop, runtime errors, unexpected program termination, any segmentation fault, 15 points each.
[30 points] Build-in commands:
Functional cd and quit commands
Correct path operations with or without arguments
[30 points] General shell operations:
The shell starts with an empty pathname environment (no command should work)
After "/bin" is added, Linux shell commands should be supported
The shell should respond correctly and gracefully to any unsupported commands, including typo
[30 points] I/O redirection:
Correct input redirection
Correct output redirection
Correct input and output redirection (at the same time)
[10 points] README and Makefile:
README should contain sufficient information, including the compile instruction, execution instruction, and an output example.
Submission:
Create a folder with the name of your group number (all lowercase), and concatenate it with "_p1". For example, if the group is "group1", then the folder should be "group1".
Copy all source files, *.c and *.h, into the folder that you created. Also copy the README and makefile to the folder.
Log in grail server, change the directory to the parent of the folder (created above), and run the following submission command (suppose the submission folder is "group1_p1"):
turnin -c cis345w -p p1 group1_p1
If the submission is successful, you should see:
Description: Your task is to write a UNIX - like

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!