Suppose I have a text file with six columns below
a|b|c|d|e|f
I know there is a 'd' character somewhere in the file, but I want to know that there is no column for it
I used the following command
awk 's=index($0,"d"){print "position="s}' filename
but he also considers delimiters that I don’t need .... I want the output to be 4 in case of "d"
source
share