[TAG] 2-cent Tip: Perl Search Directory Function
Ben Okopnik
ben at linuxgazette.net
Thu Jun 5 05:32:20 MSD 2008
----- Forwarded message from Jan Engelhardt <jengelh at medozas.de> -----
Date: Wed, 4 Jun 2008 09:40:02 +0200 (CEST)
From: Jan Engelhardt <jengelh at medozas.de>
To: TAG <tag at lists.linuxgazette.net>
Sender: jengelh at sovereign.computergmbh.de
To: thomasbonham at bonhamlinux.org
cc: ben at linuxgazette.net
Subject: Re: 2-cent Tip: Perl Search Directory Function
>>Here is a 2-cent tip that is a little Perl script for looping through
>>directories.
>
>Why not just use 'File::Find'? It's included in the default Perl
>install, and is both powerful and flexible.
Why not just use sh?
find . -type d -print0 | xargs -0r do_whatever_you_want.sh
(resp. xargs -0r/-0rn1 perl -e 'do whatever you want here')
----- End forwarded message -----
More information about the TAG
mailing list