|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> wrote:
: % cat *.c *.h | grep -c "DBL"
: 1645
: % cat *.c *.h | grep -c "SNGL"
: 72
And by the way, that's only the number of _lines_ where those words
appear, not the total count of appearances.
A more sophisticated command (read: kludge) can count the total number
of appearances:
% cat *.c *.h | grep "DBL" | perl -pe 's/DBL/\nDBL\n/g' | grep -c "DBL"
2054
% cat *.c *.h | grep "SNGL" | perl -pe 's/SNGL/\nSNGL\n/g' | grep -c "SNGL"
78
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |