Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Develop the beginnings of a simple shell by implementing the basic functionality

ID: 3624974 • Letter: D

Question

Develop the beginnings of a simple shell by implementing the basic
functionality outlined below.

The shell should continuously prompt the user for input, which is then read via scanf (or similar input
function). The prompt should be your initials followed by “sh-$”, e.g., Joe Blow’s shell would prompt
“jbsh-$ ”. The shell should initially support the following commands:
a) cd - change current directory to . If the argument is
not present, it should print the current directory.
b) clr – clear the screen

Explanation / Answer

Dear, Haven't specified what type of value to be read from input considering an example reading a numbers and printing untill less than 1 is entered echo "Enter a number"
read num
while [ $num -ge 1 ]
echo "number is $num"
echo "Enter a number"
read num
do