Simon,

This will recursively find all files with a trailing space
and call 'removespace' on them

find . -regex ".* " -type f -exec ./removespace "{}" \;

you'll need the following script accessible (called
removespace with all the correct execute perms)
to do the renaming

#!/bin/sh
echo "Move" xx$1xx "to" xx`echo $1 | sed 's/[ \t]*$//'`xx
# uncomment below when you are convinced it will work
# mv "$1" `echo $1 | sed 's/[ \t]*$//'`

Until you uncomment the last line, it will just print what it
is going to do..

only tested on linux - ymmv

Andrew
_______________________________________________
Gpcg_talk mailing list
[email protected]
http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk

Reply via email to