On Sep 22, 4:55 am, MisterMuv <[EMAIL PROTECTED]> wrote:
> chg=echo $f |sed 's:(www.somewhere.net)::'
> mv $f $chg
> What am I doing wrong?
just use this: mv "$f" "$chg",
when your filenames are using spaces and other weird characters
Also, I would suggest removing trailing spaces from filename
--- Begin Message ---
MisterMuv wrote:
Hi,
I am having a problem renaming a files using SED.
The filenames are in the following format: eg
001 - GreatPics1 (The Opening) (www.somewhere.net).jpg
002 - GreatPics2 (The Closing) (www.somewhere.net).jpg
003 - GreatPics3 (The Ending) (www.somewher
On 2008-09-21, MisterMuv wrote:
>
> Hi,
>
> I am having a problem renaming a files using SED.
>
> The filenames are in the following format: eg
>
> 001 - GreatPics1 (The Opening) (www.somewhere.net).jpg
> 002 - GreatPics2 (The Closing) (www.somewhere.net).jpg
> 003 - GreatPics3 (The Ending) (www.so
MisterMuv wrote:
> I am having a problem renaming a files using SED.
There is 'sed' and there is 'bash' and there are combinations of the
two. If you were really asking about sed then help-gnu-utils would be
the better place. But in this case your use of 'sed' was okay but
it really was your use
bash: 002: command not found
mv: target `(www.somewhere.net).jpg' is not a directory
bash: 003: command not found
mv: target `(www.somewhere.net).jpg' is not a directory
What am I doing wrong?
Thankyou all in advance.
--
View this message in context:
http://www.nabble.com/File-renaming-using-SED-