[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Shell Expansion in Bourne Shell Script Question



vogelke+debian@pobox.com (Karl Vogel) writes:

>>> On Wed, 28 Jul 2010 23:58:11 +0200, 
>>> Mart Frauenlob <mart.frauenlob@chello.at> said:

>M> One might be better of with some like this:
>M>   find /DIR -regextype posix-egrep -regex '.*\.(zip|ZIP)' -exec \
>M>     some_command {} +

>   If the filelist is potentially too big for the max argument list on the
>   system, I would do something like this:

>     find $MAGDIR -print | grep -i '\.zip$' | tr0 | xargs -0 some command

find $MAGDIR -iname '*.zip' -print0 | xargs -0 some-command

-iname matches names case insensitively. Since you then dont need grep,
you also dont need tr0.



Reply to: