or% perl -e ' while (<>) { if (/: /) { $c += (split /: /)[0]; } } prin +t "SUM.$ARGV =$c\n"' tmp_*
so on..... Nothing seems to work...it just does for one file and exits.... Help%perl -e ' while (<>) { if (/: /) { $c += (split /: /)[0]; } } print + "SUM.$ARGV =$c\n"' | xargs cat tmp_filelist
In reply to perl onliner on multiple files by abhay180
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |