[Clipart] xargs rename isn't working...

Jonadab the Unsightly One jonadab at bright.net
Sat Apr 8 08:17:01 PDT 2006


"Michael Moore" <stuporglue at gmail.com> writes:

> find . -name "* *" | rename s/\ /_/g
> 
> If rename is a standard utility, or at least standard with Perl, maybe
> the command in the release procedure should be changed as this one
> gets rid of all spaces at once.

I don't know how standard the command is, but I do not have it here.

OTOH, it would not be very many lines of Perl.  Off the top of my
head (and completely untested)...

find . -name "* *" | perl -e 'while(<STDIN>){my$o=$_;s/ /_/g;system("mv",$o,$_);}'

-- 
Open Clip Art Library:  Drawing Together
http://www.openclipart.org/




More information about the clipart mailing list