Question
I'm afraid other class mates will copy the answer. is there a way to answer this so only me can see it. This assignment will
I'm afraid other class mates will copy the answer. is there a way to answer this so only me can see it.
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started