SLUG Mailing List Archivesslug-bounces@xxxxxxxxxxx wrote on 18/12/2007 04:09:15 PM:
> Hi all,
>
> Here's a starting point. What's a more optimal way to perform this task?
:-)
>
> sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m
>
Not the most graceful, but the following seems to work:
grep -o ',' input.txt |wc -l
Cheers,
Scott