How to print only the previous 5th and 6th lines using the 'grep' command
grep total -B 5 -w my.test | awk '( ((NR%7) == 1) || ((NR%7) == 6 )) { print $0 } ' | more
How to print only the previous 5th and 6th lines using the 'grep' command
grep total -B 5 -w my.test | awk '( ((NR%7) == 1) || ((NR%7) == 6 )) { print $0 } ' | more
Comments
Post a Comment