- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- grep for date forward in a syslog
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
Discussions
Discussions
Discussions
Forums
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
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
тАО07-06-2005 03:07 PM
тАО07-06-2005 03:07 PM
This is a grep question. I'm trying to grep for a starting point in a syslog by a specific date and then capture everything else beyond that poing going forward to be able to more it in an active shell and display it. What would the syntax be to do this? I'm doing the following and don't seem to be having any luck with this:
grep "Jul 3" syslog.log | more
Thanks,
KPS
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2005 04:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2005 04:41 PM
тАО07-06-2005 04:41 PM
Re: grep for date forward in a syslog
sed -n "/$Search_Pattern/,$p" syslog.log
Just remember to use double quotes (") instead of single one (')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2005 04:55 PM
тАО07-06-2005 04:55 PM
Re: grep for date forward in a syslog
LINE=$(awk '/Jul 30/{ print NR;exit; }' syslog.log)
tail -n +${LINE} syslog.log
hth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2005 06:57 PM
тАО07-06-2005 06:57 PM
Re: grep for date forward in a syslog
perhaps you can use the awk funtionality for printing everything between a starting and an end point, e.g.:
# awk '/Jul 6/,/\$/' /var/adm/syslog.log|more
(there are two spaces beteen "Jul" and "6" in the above example).
regards,
John K.