|
How to grep at nth position?
Suppose the data is as follows:
123456789A123456
123456789A123456
123456789C123456
123456789B123456
123456789A123456
I want to grep only those records containing "A" command can be:
grep "^.........A" file_name
But if data string is very long, suppose A occurs at 690th position.
Its doesn't look good giving 690 dots and then "A"....I am sure there must be some alternative.
Please help!
-Sumit
|