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
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
06-17-2005 02:17 AM
06-17-2005 02:17 AM
cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2005 10:24 PM
06-19-2005 10:24 PM
Re: cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2005 10:34 PM
06-19-2005 10:34 PM
Re: cron
* * * * * echo "hai" | awk '{ print $1 }' | sed 's/ //g' | awk '{ print $1 } | wc -l | awk '{ print $1 }' | sed 's/ //g' | awk
'{ print $1 }' 1>>/tmp/test.log 2>&1
Is this you want or want to execute two commands one by one.
If so then try as,
* * * * * echo "hai";who 1>/tmp/test.log 2>&1
It is always better to put this one shell script and give execution permission. IT will be executed and log file is updated.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2005 10:52 PM
06-19-2005 10:52 PM
Re: cron
I think it's difficult to see this problem because a script usually can be created to customize commands and operations. Then insert the script in the sixth column of the crontab.
Best regards,
Fabio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2005 11:28 PM
06-19-2005 11:28 PM
Re: cron
It says that anything following an unascaped % will be sent to command's stdin
(similar to a here file, I would gather).
If your command line gets that long that it is getting hard to read I'd say it's time for a wrapper script as the others have replied.
Also think about your poor fellow admins
(probably some DBA who are not too familiar with Unix Shell "line noise") who require to comprehend your cronjobs in your absence.