- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Format output
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
09-16-2004 08:46 AM
09-16-2004 08:46 AM
Format output
I want to remove the time fields from crontab -l output. For example
* * * * * command
I want to remove everything before command.
In place of * there'd be time specs. In command field there'd be different script name.
Any help is appreciated.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2004 08:53 AM
09-16-2004 08:53 AM
Re: Format output
crontab -l | egrep -v "^#|^$" | awk '{for(i=6;i<=NF;i++) printf("%s ",$i); printf("\n");}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2004 08:49 PM
09-16-2004 08:49 PM
Re: Format output
crontab -l|egrep -v "^#" |cut -d" " -f6
Best Regards
JMB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2004 10:48 PM
09-16-2004 10:48 PM
Re: Format output
just type
crontab -l|grep -v "^#"|awk '{print $6}'
Should do the trick
Regards
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2004 11:01 PM
09-16-2004 11:01 PM
Re: Format output
crontab -l | grep "^[ 0-9*]" | cut -d" " -f6-
It will cut all field's 6th and after
-------
Franky, marc, we will be having some more filed's after 6 there on cron too :-)
05,15,25,35,45,55 * * * * /usr/sbin/dmesg - >>/var/adm/messages
will give only /usr/sbin/dmesg in your try there.
---------
HTH.
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2004 03:25 AM
09-17-2004 03:25 AM
Re: Format output
crontab -l | perl -ne 'split("\\s+",$_,6); print $_[5]'
HTH
-- Rod Hills