Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a shell in C, similar to well-known shells such as bash. The shell will have an interactive input prompt, be able to parse command

Write a shell in C, similar to well-known shells such as bash. The shell will have an interactive input prompt, be able to parse command line input, expand parameters, and execute non-built-in commands. It will also have built-in commands such as exit and cd and support redirection operators, background processes, and custom behavior for signals. The program will run in an infinite loop until the exit command is executed, printing informative messages on errors. The prompt message will be based on the PS1 parameter, which is expanded before each new command line. The input will be split into words, delimited by IFS characters, and expanded in each word. The program will handle background processes by checking for any un-waited-for processes before printing the prompt message and printing informative messages for child processes. The program will read a line of input from stdin and handle any interruptions from signals.

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions