How to print only the previous 5th and 6th lines using the 'grep' command

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

Popular posts from this blog

e1000e 0000:00:1f.6 eno1: Detected Hardware Unit Hang

[WordPress] Change https redirect in DB.

sanitize on in CMakeLists.txt