is it possible to print the field that contain a certain value?
Consider below file:
foo,boo,123,1234312,ABC
foo,boo,ABC,bla,bla
There is a field that contain ABC but it is not a fixed with all records, so the command need to print $5 in the first record and $3 in the second one.
grep -q ABC file && echo ABC?ABCif record containsABC. Is this what you want.