[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SLUG] recursive %20 to " "
On Sun, 25 Jun 2000, Alex S generated:
>i set up a ftp server and wget (got??) all the files not a prob but it seems to
>have changed all my spaces to %20 and all @nospam. to %40 or whatever.
>I am storing all the data on a fat32 partition i had lying around and i was
>wondering if there is an easy way /script to make all the names back to normal.
find /dosdir -name '*%20*' -exec mv {} `echo {} | sed 's/\%20/ /'` \;
that's a bit messy, i'm not even sure the quoting will work properly...
otherwise you can just do:
for i in *; do mv $i `echo $i | sed 's/\%20/ /'`; done
for each directory you need to -- which is tedious.
I like the first method, but i'm sure someone can find a quicker/shorter
command (/me thows down the gauntlet ;)
--
jamesw
------------------------------
jamesw@nospam.student.unsw.edu.au
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text