# remove spaces from file names /// does not work
EXT=boo
rm run
for (old in `{9 ls *.$EXT}) {
new=`{echo $old | tr -d ' ' }
        echo mv $old $new >> run
}

# this works, but is ugly:
# remove unwanted chars from file names
EXT=boo
9 ls *.$EXT > foo
9 cat foo |  9 tr -c [0-9][a-z][A-Z]'.''\x0a'  '_' | 9 tr -s '_' '_' |
9 sed 's/_\././g' > foo2
paste foo foo2 > foo3
9 awk '{print "mv ", $0}' foo3 > run

what am I missing?
Thanks,
++pac

Reply via email to