On Sep 22, 4:55 am, MisterMuv <fz6...@hotmail.com> 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 filenames:
for f in *; do chg=`echo $f | sed 's: (somewhere.net)::'`;mv "$f"
"$chg"; done
Yes, if you notice, you could forget nifty quotes ``, usually used for
command execution.