Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Supress Mail output of "at" command

Status
Not open for further replies.

DonDavisFCB

Programmer
Aug 22, 2001
73
US
I am having trouble supressing the system mail output of the "at" command.

If I run the "at" command from the CLI I can suppress all output, including system mail, by redirection. Example:
echo /usr/local/Tivoli/scripts/pageNOC.pl clearCache | at now + 1 minutes 1>/dev/null 2>/dev/null

However, when I do the same thing from within a perl script, I get system mail everytime. I do not want mail.

Here is the line from my perl script:
`echo /usr/local/Tivoli/scripts/pageNOC.pl clearCache | at now + 1 minutes 1>/dev/null 2>/dev/null`;

 
I figured it out. It was the placement of the redirect.
It had nothing to do with CLI vs. script. It was e-mailing me either way before I moved the redirect inside the pipe.

This works (no system mail):
`echo /usr/local/Tivoli/scripts/pageNOC.pl clearCache 1>/dev/null 2>/dev/null | at now + 1 minutes`;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top