merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) (04/05/89)
In article <18940@adm.BRL.MIL>, rbj@dsys (Root Boy Jim) writes: | ? Why not, "find . -type f -name '*.dvi' -exec rm {} \;" ? | | ? -david- | | As has been pointed out, the xargs version is much better. However, in | our never ending search for creeping featurism, perhaps it is time to | add `-rm' to the list of find options. We already have `-ls'. No, no, no. Just get 'perl'. find . -type f -name '*.dvi' -print | perl -ne 'chop; unlink;' or #!/usr/bin/perl open(A,"find . -type f -name '*.dvi' -print|") || die; (chop), (unlink) while <A>; close(A); Thanks, Larry! Another satisfied perl customer, -- /=====Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095========\ { on contract to BiiN (for now :-) Hillsboro, Oregon, USA. } {<@intel-iwarp.arpa:merlyn@intelob.intel.com> ...!uunet!tektronix!biin!merlyn } \=====Cute quote: "Welcome to Oregon... home of the California Raisins!"======/