Rewrite the systype program from Lab 16 as a function that returns the name of the system. Use this function to determine what options you will use with the ps command in the checking program.
The ps command to list all processes on AT&T UNIX is
ps ef
On BSD UNIX, the command is
ps aux
Write a function called cleanup that will remove all temporary files and exit the script. If the interrupt or hangup signal is sent while the program is running, the trap command will call the cleanup function.
Use a here document to add a new menu item to the lookup script to resemble the following:
Write a function to handle each of the items in the menu. After the user has selected a valid entry and the function has completed, ask if the user would like to see the menu again. If an invalid entry is entered, the program should print
Invalid entry, try again.
and the menu will be redisplayed.
Create a submenu under View entry in the lookup script. The user will be asked if he or she would like to view specific information for a selected individual:
a) Phone b) Address c) Birthday d) Salary
Use the trap command in a script to perform a cleanup operation if the interrupt signal is sent while the program is running.