Get help from the best in academic writing.

C Programming Question

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 “[[email protected]] $” 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 shell
pid – shows the shell’s process id
cd – changes shell’s current directory
pwd – shows the shell’s current directory
Avoid 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 input
2- Check some cases that handled inside the shell (no forking, “built-in” commands):
(1) change directory
(2) print directory
(3) help
(4) get process id
3- 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. as
mysh.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

Write a simple shell, which is a program that waits for you to type a command, and once you type it, runs that command

The picture provided is basially most or all of the code you just need to combine it together
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 shell
pid – shows the shell’s process id
cd – changes shell’s current directory
pwd – shows the shell’s current directory
Avoid all zombies.
==================
Outline of code:
Start a loop (we are going to loop forever so users can type commands over and over again).Get the input
Check some cases that handled inside the shell (no forking, “built-in” commands):change directory
print directory
help
get process id

Otherwise (not “built-in” command):Split the command into argv array
Fork
Child runs exec
Parent waits

ASPEN Oneline

Programming Assignment Help The question must be answered correctlyThe solution must be applied in ASPEN OnelinerAvoid plagiarism or copying from any source
Avoid using https://www.chegg.com/Because I am subscribed to it and I have all the solutions in it, but they were not implemented in the program
Stick to the time allotted to you and be honest
The solution must be in a word file and write to the computerAvoid handwriting

C Programming Question

This assignment covers learning objective 1: An understanding of basic data structures, including stacks,
queues, and trees; learning objective 3: An ability to appropriate sorting and search algorithms for a given
application.
This assignment is to be completed on your own. You will implement Shell sort on an array and Shell
sort on a linked list. In both cases, you will use the following sequence for Shell sort:

error: Content is protected !!