[Omaha.pm] One liners are good for you

Jay Hannah jhannah at omnihotels.com
Wed Nov 29 09:58:41 PST 2006


I love rattling through various one-liners trying to find the answer to
the question I'm looking for. I almost had by first-ever successful use
of -a, but not quite.

perldoc perlrun    is your friend. :)

j


 ps -ef | perl -nae 'print "$F[8]\n"' | more

 ps -ef | perl -pe 's/.*\d+:\d\d //;' | sort | uniq -c | more

 ps -ef | perl -ne '/.*\d+:\d\d (.*?) /; print "$1\n"' | sort | uniq -c
| more


More information about the Omaha-pm mailing list