Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

cat to line number

$ cat -n file | awk '$1>=4 && $1<=8 || $1==12 || $1==42'
 4  Line 4
 5  Line 5
 6  Line 6
 7  Line 7
 8  Line 8
12  Line 12
42  Line 42
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #cat #line #number
ADD COMMENT
Topic
Name
5+3 =