scottpeter
Programmer
I need to check for certain patterns in a particular column and display the records with that pattern.
I am using the command as follows. 231 to 242 is the coulmn position.
cut -c231-242 p1.dat | grep '100000000000'
cut -c231-242 p1.dat | grep '111111100000'
cut -c231-242 p1.dat | grep '111000000000'
But it pulls out only the column. How can I display the whole record with the matching pattern.
Thanks,
SP
I am using the command as follows. 231 to 242 is the coulmn position.
cut -c231-242 p1.dat | grep '100000000000'
cut -c231-242 p1.dat | grep '111111100000'
cut -c231-242 p1.dat | grep '111000000000'
But it pulls out only the column. How can I display the whole record with the matching pattern.
Thanks,
SP