[lug] Fixing filename characters...

kenw at ihs.com kenw at ihs.com
Wed Jan 19 13:36:05 MST 2000


#!/bin/bash
for file in *;do
newfile=$(echo $file|tr " " "_")
test "$file" != "$newfile" && mv "$file" $newfile
done


* B. Allyn (ballyn at catacom.com) [000119 13:20]:
> Okee, so I just moved a bunch of images from a CD-ROM to my RH6.1 webserver,
> and they've got lovely win32 spaces in them.
> 
> Rather than fix this on that side, how can I change the space to, say, an
> underscore for the 1500 files in that directory?
> 
> TIA...
> 
> B. Allyn
> 
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug

-- 




More information about the LUG mailing list