Question: Create a simple shell in C . The shell should support the following commands: 1 . cd - change directory cd 2 . pwd -

Create a simple shell in C. The shell should support the following commands:
1. cd - change directory
cd
2. pwd - print working directory
pwd
3. exit - exit the shell
exit
4. help - display help
help
A sample output would be:
myshell> help
cd - change directory
pwd - print working directory
exit - exit the shell
help - display help
mkdir - create a directory
rmdir - remove a directory
ls - list files in a directory
cp - copy a file
mv - move a file
rm - remove a file
5. mkdir - create a directory
mkdir
6. rmdir - remove a directory
rmdir
7. ls - list files in a directory
ls
A sample output would be:
myshell> ls
file1 file2 file3
8. cp - copy a file
cp
9. mv - move a file
mv
10. rm - remove a file
rm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!