Write a shell script to send a customized mail message to


Write a shell script to send a customized mail message to the users listed on the command line by login (user) name, only if they are currently logged on. If no users are listed on the command line, an error message should be printed.

In the mail message, the full (real) name from the passwd file (/etc/passwd) should be used. Also, mail should be signed with the real name of the person who is running the script.

Following error message should be printed if an argument username does not exist in the passwd file - "Please send this message to users whom you know personally.".

The mail message should be as follows:

Hello "",

Please ignore this mail. The current time and date is . Have a nice day.

""

Solution Preview :

Prepared by a verified Expert
Programming Languages: Write a shell script to send a customized mail message to
Reference No:- TGS01257356

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)