The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
Another grep question
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Another grep question
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
5
(
permalink
)
10-27-2006
Ygor
Moderator
Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,409
If you don't have
GNU
grep...
Code:
[n]awk '{a[NR%p]=$0}$0~s{for(c=p;c>0;c--)print a[(NR-c+1)%p]}' p=3 s=EXEC blah.conf
Ygor
View Public Profile
Find all posts by Ygor
Find Ygor's past nominations received
Find Ygor's present nominations given