I want to apply grep on particular column in column command.
myfile.txt
3,ST,ST01,3,3,856
3,ST,ST02,4,9,0234
6,N1,N101,2,3,ST
6,N1,N102,1,60,Comcast
6,N1,N103,1,2,92
My Command:
column -s, -t < myfile.txt | grep -w "ST"
Here I want to only grep the pattern ST in 2nd column. How to do this ?
Expected Result:
3 ST ST01 3 3 856
3 ST ST02 4 9 0234