cat syslog.*.gz | gzip -d - | sed -n -e '/regexp/{=;x;1!p;g;$!N;p;D;}' -e h
The cat syslog.*.gz | gzip -d - can also be replaced by using this command: gzcat < syslog.*.gz
Friday, August 10, 2007
Linux "grep -A1 -B1" in HP-UX
Posted by kapla.hodot at 18:10
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment