At 2004-11-07T21:23:55+1300, Chris Downie wrote:
> I have a text file that I need to count exactly how many times a
> particular character appears.
Here's something that isn't particularly efficient, but it's very
simple:
$ sed -e 's/[^A]//g' | wc -c
Subsitute 'A' with the character you need to count.
> Can someone offer me the correct grep syntax to achieve this?
grep(1) is line-oriented, so it's rather difficult to achieve what you
want with grep.
Cheers,
-mjg
--
Matthew Gregan |/
/| [EMAIL PROTECTED]