[plug] Remove first spcae in a filename

Matt Kemner zombie at wasp.net.au
Tue Jul 10 23:12:46 WST 2001


On Tue, 10 Jul 2001, Christian [iso-8859-1] Müller wrote:

> The problem being with this is that I have to do every file manually (a bit 
> hard with 300 of them). But thanks for the suggestion

Try:

for X in \ *
do
  mv "$X" $X
done

This will work because the shell will expand the filename within ""'s for
the source file name, and without the ""'s for the destination file name,
so the space will just add to the spacing between the 2 arguments.

 - Matt




More information about the plug mailing list