In article <6kau06.rd.ln at wpxx02.toxi.uni-wuerzburg.de>,
Cornelius Krasel <krasel at wpxx02.toxi.uni-wuerzburg.de> wrote:
>To change filenames with spaces into filenames without spaces, do
>something like the following (should work for a bash-like shell):
>>for i in *\ *
> new=`echo $i|tr -d ' '`
> mv $i $new
>>This will rename all files "with space" in your current directory in
>"withspace". If "withspace" exists, it will be overwritten.
Since you are using GCG, you probably want a csh eequivalent for this,
and you probably don't want it to overwrite existing files, in which
case you want the following:
foreach f (*\ *)
mv $f `echo $f | tr -d ' '`
If you want the spaces changed to underscores, rather than removed,
tr -d ' '
tr ' ' '_'