Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 08:39 AM
04-01-2008 08:39 AM
at job
I have a at job like this and it send the e-mail to me automatically once the job ran. i do not want to get the e-mail , i want to redirect the output or error to a file . please advice how can i do it.Thanks much
at -f /tmp/test now
----------------
I have tried like this ..it did not work
at -f /tmp/test now >/tmp/out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 08:48 AM
04-01-2008 08:48 AM
Re: at job
# at -f /tmp/test now > /dev/null 2>&1
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 08:52 AM
04-01-2008 08:52 AM
Re: at job
Still getting the e-mail notification.
please advice..would like to have no e-mail notification
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 09:06 AM
04-01-2008 09:06 AM
Re: at job
or you can use the following line at the starting of the script. and if you are using mailx or sendmail command in your script then you have to comment that line to avoid mail.
exec 2> /tmp/out 1>&2
Regards,
Piyush Mathiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 09:27 AM
04-01-2008 09:27 AM
Re: at job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2008 09:28 AM
04-01-2008 09:28 AM
Re: at job
Well, it seems that we need to do something different.
Choice one, since this is an immediate run is to substitute 'batch' and do:
# batch < /tmp/mytest > /tmp/mylog 2>&1
> !!
Type this at the prompts as shown
The methodology I commonly use for scripts that might or might not be 'cron'ed (or run via 'at') is something like this:
# cat mytest
#!/usr/bin/sh
[ -t 0 ] || exec > /tmp/mylog.$$ 2>&1
echo "this is from STDOUT\n"
print -u2 "this is from STDERR\n"
This tests to see if a terminal (for STDIN) is associated with the process. If not, it is assumed that all output should be redirected to a file.
Regards!
...JRF...