Originally Posted by sag47
At first I was going to do it in awk. But then I kept it simple and used sed to strip all characters that aren't the special character you're looking for.
echo "1/2/3/4/5" | sed 's/[^/]//g' | wc -m
tanx for the answer, but i find a better way,
cat mytextfile | tr -cd "/" | wc -c