1. Create a directory EMAIL in your HOME directory
2. Create a .mailrc file in your HOME directory. If one already exists modify it
3. Set up mailx as follows:
a. Use the alias command to assign names to a group users
b. Set up a file in the EMAIL directory to save your outgoing mail automatically
c. Set your mbox in the EMAIL directory
4. Send the following mail to yourself:
So little time and so much to do.
Could it be reversed?
So much time so little to do.
5. While mailx is in the inpute mode, use the vi editor to compose your mail.
6. Read the current date and time and append it to the end of your message.
7. Save the message in a file before transmitting it
8. Compose a few more messages in the sma e manner, using vi and other commands. And send them to yourself. This should give you enough messages to practice reading your mail.
9. Read your mail
10. Use all the commands in the mailx command mode, including delete, undelete, save and so on
11. Read your mail and exit mailx using the x command, then read your mail and exit mailx using the q command. Observe UNIX messages.
12. Use mailx and look at your mbox
13. Now find another partner and have a chat using write command
14. Set the mesg to n, then to y, and observe the effect with your partner.
Second
1. Create a shell script named LL that lists your directory in a long format
a. Execute LL using the sh command
b. Change LL to an executable file
c. Execute LL again
2. Create a script file that performs the following
a. Clears the screen
b. Skips two lines
c. Shows the current date and time
d. Shows the number of users on the system
e. Beeps a few times and shows the message NOW AT YOUR SERVICE
3. Modify the largest script file from this chapter to recognize the number of inputs and display appropriate messages
4. Write a script file similar to largest that calculates the smallest of three integer numbers that are read from the keyboard. Make it able to recognize some input errors
5. Create a script file for each of the script examples in this chapter that were typed at the $ prompt. Make the appropriate modifications if necessary and run them. Use sh with the -x and other options to debug, and investigate the way shell scripts are executed.
6. Write a script file that sums the numbers passed to it as arguments on the command line and displays the results . Use the for loop construct in your program. For example if you name this program SUM and you type
$ SUM 10 20 30 [Return]
The program displays the following
10 + 20 + 30 = 60
7. Rewrite the SUM program, this time using the while loop.
8. Rewrite the SUM program, this time using the until loop.
9. Modify the script file largest from this chapter to accept numbers from the command line. For example, you type LARGEST 1 2 3 and the program displays
The larges is: 3
10. Modify the script file greetings1 from this chapter and use cut command to calculate the hour of the day
11. Create a script called file_checker that reads the filename entered and outputs the file properties such as exists, readable and so on
12. Write a script file named b that shows the current date
13. Write a script file named t that shows the current time
14. Write a script file named s that displays the name of your current shell.
15. Write a script file that checks if you have a .profile file in your HOME directory or not and displays an appropriate message.