Grep Specific String In CSV

view full story

http://www.unix.com – Hi All, I have a csv file like the following: "ABCD2","EFGH2","XXXX","1" "ABCD2","EFGH2","XXXX","2" I want to grep out the row which contains the value of 2 within the 4th column, so then i can use the extracted record to cut up and store into numerous variables. Obviously when trying `cat csvfile.csv | grep 2` it greps both lines, as columns 1 and 2 contain the value of 2 also. I have also tried playing about with grep -x but still to no avail. Any help would be greatly appreciated. :) Cheers (HowTos)