Write a simple shell (command interpreter), which reads commands from the standa
ID: 3811856 • Letter: W
Question
Write a simple shell (command interpreter), which reads commands from the standard input and executes them. Here are the features that must be included in your program: Display the prompt "" before reading the next command line. Read and parse one command line at a time from the standard input. You can assume that only one command and its arguments are in a command line. The command "exit" should cause your program to terminate. Call fork() to create a new process, which calls one of the exec functions to execute the command that was read. Your program should wait until the execution of the command is finished and then continue to read the next command line.|Explanation / Answer
function shell
$filename = chegg
read -chegg
for next in cat chegg
function pause()
{
echo "myshell"
}
done
exit 0
}
fork()
{
count = 0
while($count<=n)
do
{
shell
count = $((count +1))
done
}
fork
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.