Question
Write a shell in C that implements a command line interface similar to well-known shells like bash. The shell will have an interactive input prompt
Write a shell in C that implements a command line interface similar to well-known shells like bash. The shell will have an interactive input prompt and parse the command line input into semantic tokens. It will implement parameter expansion, shell special parameters ($$, $?, and $!), tilde (~) expansion, two shell built-in commands (exit and cd), redirection operators (< and >), and the & operator to run commands in the background. The shell will also handle custom behavior for SIGINT and SIGTSTP signals. The shell will run in an infinite loop and will terminate when the built-in exit command is executed or on EOF on stdin. The assignment is expected to test the Unix process API, signal handling, and I/O redirection.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started