Computing.Net > Forums > Unix > Print previous line

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.

Print previous line

Reply to Message Icon

Name: johan
Date: November 28, 2008 at 10:54:18 Pacific
OS: Solaris 9
CPU/Ram: 1
Comment:

How I can search file and if word match, script will print that line and, for example, five previous line. (awk or other)

1
2
3
4
5
6
7
8
9 Match

then will print line 4-9



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: November 28, 2008 at 15:04:48 Pacific
Reply:
0

Response Number 2
Name: johan
Date: November 30, 2008 at 23:59:43 Pacific
Reply:

thanks.
There was the response to my question.
johan


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: Print previous line

Reading previous line www.computing.net/answers/unix/reading-previous-line/5428.html

grep - print next line too www.computing.net/answers/unix/grep-print-next-line-too/7417.html

Print certain line from a text file www.computing.net/answers/unix/print-certain-line-from-a-text-file/6955.html