Line Count

Alain Schroeder alain at parkautomat.net
Sat Feb 9 15:15:03 CET 2002


On Sat, Feb 09, 2002 at 02:44:15PM +0100, Kai Windmöller wrote:
> find . -type f -exec wc -l {} \; | cut -b-8 | perl -e "for(<STDIN>) {
> \$s=\$s+\$_;};print \$s"
> /* Summe der Zeilen */
> 
> PS: gibt es ein Tool mit dem man den Perlteil ersetzen kann (ausser
> awk)?

S=0 
for i in `find . -type f -exec wc -l {} \; | cut -b-8`; do S=$((S+i)); done
echo $S

	Ciao,
	   Alain 

-- 
"I can't understand why people are frightened of new ideas.  I'm frightened
of the old ones."                       -- John Cage
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20020209/63dc5c4d/attachment.sig>


More information about the Linux mailing list