I'm having trouble matching a specific column with the grep command. I have a test file (test.txt) like this.
Bra001325 835 T 13 c$c$c$c$c$cccccCcc !!!!!68886676 Bra001325 836 C 8 ,,,,,.,, 68886676 Bra001325 841 A 6 ,$,.,,. BJJJJE Bra001325 866 C 2 ,. HJ
And I want to extract all those rows that have the number 866 in the second column. When I use the grep , I get all the lines containing the number whose number is
grep "866" test.txt Bra001325 835 T 13 c$c$c$c$c$cccccCcc !!!!!68886676 Bra001325 836 C 8 ,,,,,.,, 68886676 Bra001325 866 C 2 ,. HJ
How can I map a specific column to a grep command?
source share