Question: very simple shell for xv6. It should be able to: 1) run commands with arguments, like ls,cd, please don't copy code from internet since teacher

very simple shell for xv6. It should be able to:

1) run commands with arguments, like ls,cd,

please don't copy code from internet since teacher is vey strict.

Full details.

This assignment will help you understand how the Unix shell uses basic system calls. 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(). I will test your nsh.c by copying it into a fresh xv6 distribution and compiling using make. 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 @

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!