Apply all the skills you've learned by developing a simple shell program that can execute commands like ls
, pwd
, and echo
.
-
Create a file named
assessment_15.c
. -
Write a C program that:
- Implements a basic shell interface that reads input from the user.
- Parses and executes commands using
fork
,exec
, andwait
system calls. - Handles basic commands like
ls
,pwd
, andecho
.
-
Compile and run the program.
$ ls file1.txt file2.c $ pwd /home/user $ echo Hello, World! Hello, World!
- Combining all the learned concepts.
- Understanding process creation and management.
- Parsing and executing user commands.