# Sum the numbers in the first column of a file perl -lpe '$,+=$_}{$_=+$,' file # Count (badly) the number of blocks allocated in a directory ls -ls | perl -lpe '$,+=$_}{$_=+$,'
In reply to Sum of the first column numbers by jmcnamara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |