Question: simple shell Please don't copy from github or other website, I need fresh code Your job is to write a simple shell for xv6. It

simple shell Please don't copy from github or other website, I need fresh code

Your job is to write a simple shell for xv6. It should be able to: 1) run commands with arguments 2) handle input and output redirection 3) set up two element pipelines

your shell should act like the xv6 shell sh for the following commands, as well as similar commands: echo hello there echo something > file.txt ls | grep READ

(test these commands in xv6 to see what type of behavior they produce) Put your shell source (nsh.c) in the root xv6 /user directory, and modify Makefile to compile it. Xv6 comes with a small library of C functions in ulib.c, feel free to use them. Do not use malloc(). You may use the xv6 shell (sh.c) to help get you started, but please do not copy-paste the code (I will check this). If you do re-use code from sh.c, be sure to comment appropriately. Your shell should use @ (at sign) as a prompt rather than $, to avoid confusion with the real shell. An xv6 session with your shell might look like this: Init: starting sh $ nsh @

Grading: Command execution: 50% - your shell should be able to execute commands like ls, grep, rm, etc. Redirection: 25% - your shell should be able to redirect command output to a file using > Pipes: 25% - your shell should be able to pipe one commands output into another command

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 Databases Questions!