I need a simple nawk, awk, or sed program (or anything else, really) that will count the number of pipe characters in a file. So, if my file looks like this:
222222222222222|2222|2222|222222|||
|222222|222|222222222222||222|
|||22222222|222222222|2|||222222222222|
I need the program to return me: 21
Simple enough, I know... Anyone have any ideas? Thanks in advance!
222222222222222|2222|2222|222222|||
|222222|222|222222222222||222|
|||22222222|222222222|2|||222222222222|
I need the program to return me: 21
Simple enough, I know... Anyone have any ideas? Thanks in advance!