Comment on Top Unix Command Line UtilitiesparentComments−EvilTerran13yAre you familiar with perl's -n and -p switches?http://perldoc.perl.org/perlrun.html#*-n*Those "flt" lines could be written perl -lpe 's|\s+| |gsi' file.txt find . | perl -ne 'if (-f) { print -s }' (-l chomps the incoming newlines, and puts them back on the output)Of course, "perl -ne" is longer than "flt", and I appreciate all this implicit use of $_ is not to everyone's tastes.−visarga13yYes, but I bundled slightly better syntactic sugar in my tool. It's the same, in essence.
Comments
Are you familiar with perl's -n and -p switches?
http://perldoc.perl.org/perlrun.html#*-n*
Those "flt" lines could be written
(-l chomps the incoming newlines, and puts them back on the output)Of course, "perl -ne" is longer than "flt", and I appreciate all this implicit use of $_ is not to everyone's tastes.
Yes, but I bundled slightly better syntactic sugar in my tool. It's the same, in essence.