Quote:
Originally Posted by nareshk
...what if the input file is like this
09 0 01000000001234 Z 1
09 0 01000000001234 Z 1
09 0 010050000001234 Z 1
09 0 010040000001234 Z 1
09 0 010030000001234 Z 1
09 0 010010000001234 Z 1
and now i want to fetch the rows with match string "0000001234" i.e search the string from 10th column to 19 th column and fetch the rows
|
Something like this:
Code:
$
$ awk 'substr($0,10,10) == "0000001234"' input.txt
09 0 01000000001234 Z 1
09 0 01000000001234 Z 1
$