Limited time offer

Get 25% off your order

Use the code below at checkout — offer expires soon.

Your promo codeNURSE24
25%
Expires in: 10:00
Claim my 25% discount
LIMITED OFFER Get 25% off — use code BESTW25 | No AI No Plagiarism On-Time Delivery Free Revisions Claim Now

EssayQuest – 24/7 Homework & Research Assistance

Fast, Reliable, and Plagiarism-Free Help for Students in the USA, UK & Australia

EssayQuest – 24/7 Homework & Research Assistance

Fast, Reliable, and Plagiarism-Free Help for Students in the USA, UK & Australia

Assignment #5 Instructions: Limited Shell Through this programming assignment, the students will learn to do the following: Work with processes using fork, pipe, wait, dup2, and the exec system calls. Additional practice with a Makefile with an all target Work with the different address spaces

Assignment #5 Instructions: Limited Shell

Through this programming assignment, the students will learn to do the following:

Work with processes using fork, pipe, wait, dup2, and the exec system calls.

Additional practice with a Makefile with an all target

Work with the different address spaces

The main idea of this assignment is to write a limited function shell that only runs a few programs from a menu.

Write 4 small programs to start with followed by the menu program called newshell.

1. letters

One program will output the letters in the alphabet to the screen. Make sure they are printed one at a time, one per line.

Usage would be: letters

Output would be:

A
B
C
Etc.

2. numbers

Program 2 would print the numerals 0-9 to the screen. Make sure they are printed one at a time, one per line.

Usage would be: numbers

0
1
2
Etc.

3. firstname

Program 3 would print out your first name which is passed in as an argument on the command line in mixed case. This would go to the screen.

Usage would be: firstname yourfirstname

4. userinput

Program 4 will accept alphabetic input from the user via stdin change it to all capital letters and print it to the screen. Do not ask the user to enter the input. Assume the user will know to input alphabetic input.

Usage would be: userinput

5. newshell

Write a parent program similar to myshell.c but called newshell which will allow the user to choose from a menu of options.

Usage would be: newshell

1 letters
2 numbers
3 firstname
4 userinput
5 letters > filename   (letters redirected to a file)
6 letters | userinput   (letters piped to userinput)
7 firstname| userinput   (names piped to userinput)
8 exit  (your program should end by leaving the infinite loop.)

These programs should be completed with the process commands fork, pipe, wait, dup2, and the 6 exec programs. The newshell program should not run any of the other programs, it should fork off children to run the programs.

Do not use any system calls. Make sure you close all file descriptors before the program ends.

Your program will earn points based upon the number of menu items that run properly.

You will need a Makefile with an all target to compile all the programs.

Please submit your work as one zip file. Follow the instructions below carefully (to avoid unnecessary loss of grade):
You should submit the source code and the Makefile in the zip file called FirstnameLastnameA5. One should be able to create all the executables by simply ‘make’. The Makefile should also contain a ‘clean’ target for cleaning up the directory (removing all object files at a minimum). Make sure you don’t include intermediate files: *.o, executables, *~, etc., in your submission. (There’ll be a penalty for including unnecessary intermediate files or folders). Six files should be included unless permission is given for more, those would be letters.c, numbers.c, firstname.c, userinput.c, newshell.c, and Makefile.

Late submissions will have a late deduction as per the syllabus.

If the program does not compile using your Makefile and do something useful when it runs it will not earn any credit.

If a program is plagiarized, it will not earn any credit.

If a program uses a user written .h file without permission it will not earn any credit.

Assignment #5 Instructions: Limited Shell Through this programming assignment, the students will learn to do the following: Work with processes using fork, pipe, wait, dup2, and the exec system calls. Additional practice with a Makefile with an all target Work with the different address spaces
Scroll to top

Get Help with your courses Online From Expert Tutors

X
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, how can I help?