Re: File renaming using SED in BASH

2008-10-03 Thread vian
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

[Fwd: Re: File renaming using SED in BASH]

2008-09-30 Thread Roman Rakus
--- 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

Re: File renaming using SED in BASH

2008-09-21 Thread Chris F.A. Johnson
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

Re: File renaming using SED in BASH

2008-09-21 Thread Bob Proulx
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

File renaming using SED in BASH

2008-09-21 Thread MisterMuv
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-