Script file support make the shell capable of taking its


Operating Systems Projects and Exercises Exercise 6

Finishing Off Your Shell This week you will be putting the finishing touches to your shell: Script file support Make the shell capable of taking its command line put from a file whose name is provided as a command line in argument. i.e. if the shell is invoked with a command line argument: my shell batchfile then batchfile is assumed to contain a set of command lines for the shell to process.

When the end-of-file is reached, the shell should exit. When a batch file is provided, the shell should provide no prompt. obviously shell is invoked without a command line argument it should solicitinput from the user via a if the prompt on the display as before.

You will probably need to have a look at the difference between the gets and fgets functions and insert a test for end-of-file for when reading from a file (int You may find it easier to use fgets for both types of input using the default FILE stream pointer atdin when no batch file is specified.

Note the use fgets in the c example of Internal Commands Aliases: To provide support for batch file operation, add the following internal commands: echo <="" span="">

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Script file support make the shell capable of taking its
Reference No:- TGS02879223

Expected delivery within 24 Hours