POV-Ray : Newsgroups : povray.general : Large numbers? : Re: Large numbers? Server Time
8 Aug 2024 08:11:16 EDT (-0400)
  Re: Large numbers?  
From: Warp
Date: 12 Apr 2001 11:22:19
Message: <3ad5c82b@news.povray.org>
Warp <war### [at] tagpovrayorg> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.