Computing.Net > Forums > Unix > Grep output help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Grep output help

Reply to Message Icon

Name: sfAdmin
Date: January 7, 2008 at 11:35:54 Pacific
OS: Linux
CPU/Ram: n/a
Product: n/a
Comment:

Hello,

I need to return all the text from a logfile after Jan 07. When I use grep Jan 07 it only returns the lines with this text, but I need all the lines after the first match of Jan 07.
Does anyone know the command to get that.

Thank You



Sponsored Link
Ads by Google

Response Number 1
Name: James Boothe
Date: January 7, 2008 at 12:11:55 Pacific
Reply:

A command such as awk or sed would be better to identify and process a block of lines.

sed -n '/Jan 07/,$ p' logfile


0

Response Number 2
Name: sfAdmin
Date: January 7, 2008 at 12:22:03 Pacific
Reply:

Thanks James,

The command you gave me worked. I don't usually work in Linux but I needed some log info from the server.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Grep output help

Grep Help www.computing.net/answers/unix/grep-help/5833.html

special output help www.computing.net/answers/unix/special-output-help/3904.html

Grep Command Help www.computing.net/answers/unix/grep-command-help/7089.html