,1) == "
where c is the character you're searching for, and n is the column you care about.
Where would you do this? If you're processing a file with very strict
formatting, this might be useful; for example, you might have a
telephone list with a
# in column 2 for "audio" telephone numbers,
$ for dial-up modems,
% for fax machines.
A script for looking up
phone numbers might use an awk command like this to prevent you
from mistakenly talking to a fax machine.
If your data has any TAB characters, the columns might not be where you expect. In that case, useon the file, then pipe it to awk.