Google Answers Logo
View Question
Q: BASH assignment ___ATTN DOGBITE ( Answered,   0 Comments )
Subject: BASH assignment ___ATTN DOGBITE
Category: Computers > Programming
Asked by: dubbs123-ga
List Price: $15.00
Posted: 29 Apr 2003 15:01 PDT
Expires: 29 May 2003 15:01 PDT
Question ID: 197181
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, you should use
the full (real) name from the passwd file (/etc/passwd). An error
message should be printed if the user does not exist in the passwd
file. USE MAILX program

A "Here-Document (In-Line Redirection)" should be used for the mail
message. No temporary files should be used. The message should be as
follows: Hello , Please ignore this mail.

Request for Question Clarification by dogbite-ga on 29 Apr 2003 15:07 PDT
Hey dubbs123-ga,

  I will answer this question
  by 9:00am tomorrow morning.

  Is that okay?

Subject: Re: BASH assignment ___ATTN DOGBITE
Answered By: dogbite-ga on 29 Apr 2003 15:51 PDT
Hi dubbs123-ga,

  Actually, I found time write the
  script before I went out.  I have
  put it here:

  There are two caviats:

    1) I'm not positive of the format of
       your system's etc/passwd file.  Hopefully
       the lines in your file are delimited by
    2) I don't have mailx installed on my system.
       Still, I've used it before, and I think
       it will work.

  Please let me know how that works for you.


Request for Answer Clarification by dubbs123-ga on 01 May 2003 16:24 PDT
It's all set Greg can you go here and check it pls

Clarification of Answer by dogbite-ga on 01 May 2003 16:59 PDT
Hey dubbs123-ga, 

  Yeah, that looks great.
  I'm happy I could help you.

There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy