Thursday, January 27, 2011

grep -A for Solaris

(Via Edson Oliveira at Gemalto)

# nawk '/root/{c=7}c&&c--' /etc/passwd


Where c=7 is the number of lines you want to grep after.

No comments:

Post a Comment