Here is a little script I wrote to get rid of strange characters in file names. Strange file names often occure when the files are downloaded from usenet or the internet - or copied over from a FAT32 partition. Anyway, here's the script:

#!/bin/sh
 
# program to convert spaces in filenames to underscores
# it also converts unusual characters to their more standard
# counterparts. It does not check for the existance
# of the target file name.
 
while read file ; do
    newname=`echo "$file" | tr " " "_"`
    newname=`echo "$newname" | tr "&" "_"`
    newname=`echo "$newname" | tr "#" "_"`
    newname=`echo "$newname" | tr "\'" "_"`
    newname=`echo "$newname" | tr "" "e"`
    newname=`echo "$newname" | tr "" "u"`
    newname=`echo "$newname" | tr "!" "_"`
    newname=`echo "$newname" | tr "(" "_"`
    newname=`echo "$newname" | tr ")" "_"`
    newname=`echo "$newname" | tr "$" "_"`
    newname=`echo "$newname" | tr "@" "_"`
    mv "$file" "$newname"
 
   done

Some of these characters have to be entered as hex codes - depending on what editor you use - and so I offer the file here for your convenience.

To use this script, make it executable and stick it somewhere in your default PATH. Then, to run filenames through it, just type:

ls filename | nospaces
or,
ls | nospaces
or some other command that will feed filenames through the pipe.