Hi ALL :).
i have a file,
cat 3 +
dog 5 +
rat 6 -
i want to print no of record having pattern "+".
thanks in advance .
Hi ALL :).
i have a file,
cat 3 +
dog 5 +
rat 6 -
i want to print no of record having pattern "+".
thanks in advance .
awk '/\+/{i++}END{print "No. of + is " i}' infile
Or if you don't <<have>> to use awk:
grep -c + infile