Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Should civil service employees be allowed to unionize? Why?

Answered: 1 week ago