>>>>> "Mathew" == Mathew Hennessy <[EMAIL PROTECTED]> writes:
Mathew> Fair enough, though for truly oneoff stuff find |while read is still my
Mathew> friend...
Mathew> find ./ -type f -name *.bak -mtime +30 |while read f; do echo "removing
Mathew> [$f]"; rm -f $f; done
Mathew> (on solaris)
Mathew> ps -ef|while read owner pid ppid other; do if test $owner == "real";
Mathew> then echo "$owner: [$pid]"; fi; done
As long as you don't mind someone ruining your day when you have
a filename or a directory name with an embedded newline, that's
fine. My all-perl solutions never have that problem.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!