Write a simple shell

Learning Goal: I’m working on a linux discussion question and need an explanation and answer to help me learn.Read chapters 4 and 5 in the OSTEP book.Write a simple shell, which is a program that waits for you to type a command, and once you type it, runs that command (that program).Your shell should have a “prompt”, which is a symbol or message that indicates it’s ready to receive commands. The xv6 shell has “$” and the delenn shell has “[username@delenn] $” or similar. Choose your own prompt.Make sure your shell can run programs with or without arguments, like “ls” or “cat README” and so on.Print an error message if the command the user types cannot be executed.Shells also often have some builtin commands that are not programs (they don’t cause a fork/exec). Support the following builtin commands:help – shows a simple message about how to use your shellpid – shows the shell’s process idcd – changes shell’s current directorypwd – shows the shell’s current directoryAvoid all zombies.Turn in your .c file. You can name it whatever you want.Hints:Use the strsplit() function we created in class to break the user input into argv array.When creating argv (probably with strsplit), make sure you add another slot at the end that you fill with a 0 (null). This is what exec() expects.To support “cd” (change directory), first, don’t do a fork/exec since cd needs to change the directory of the shell process; instead, run the function chdir(new_dir_name) which is defined by xv6. This will change the directory the shell is running in, so if the shell tries to open/save files, run programs, etc., it will look in this “current working directory” to do so.To support “pwd” (print working directory), keep track of the working directory (from the “cd” command) in your own code. The first working directory will be “/” when the shell starts. There is no way to get the name of the current working directory from xv6.Outline of code:1- Start a loop (we are going to loop forever so users can type commands over and over again).(1) Get the input2- Check some cases that handled inside the shell (no forking, “built-in” commands):(1) change directory(2) print directory(3) help(4) get process id3- Otherwise (not “built-in” command):(1)Split the command into argv array(2)Fork(3)Child runs exec(4)Parent waits———————————————————————————————————-I will upload two file :link https://pages.cs.wisc.edu/~remzi/OSTEP/ as Assignment said for Read chapters 4 and 5 in the OSTEP book. asmysh.c this file professor solved part of the assignment maybe this file will help u and I prefer to use professor file and solve rest of the assignment
Requirements:   |   .doc file

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.