I am fairly new to regular expressions and am looking for a sed/awk/grep/wc command to find the following in a pipe delimited text file the number of occurrences of the digit 1 after the 12th pipe.Here is an example of the text file:2|JOHN||HAY||2955|ROSE|ST|#39D|Tool|TX|769065589|2542444320|||2222299310|SSD||01/08/2014^M8|ALEN|BOBRISE|FITZGERALD||5432|Red|Ave|Apt 253|Bloomington|MN|559322972||9582544754|||MINNESOTA JIL|MN|01/08/2014^MMy preferance is sed or wc since this is what I am most familiar with, but I'll take what I can get.
Number of occurrences in a text file where first character after 12th pipe is equal to 1?
command line;text processing
I would use cutcat myfile.txt | cut -d '|' -f 12 | grep -c 1