I have a list of files that are using %20 to indicate a space in their names.
I'm currently trying to do the following to change them all from %20 to a space " ".
for x in *.txt
do mv $x $(echo $x | sed -e 's/%20/ /')
done
That doesn't play nice. It spits out this:
usage: mv [-f | -i | -n] [-v] source target
mv [-f | -i | -n] [-v] source ... directory
But I do the same thing on some of my images when I'm importing them and it works fine:
for x in *_MG*.CR2
do mv $x $(echo $x | sed -e 's/_MG/_IMG/')
done
Forgetting that one is using .TXT and the other is .CR2, what am I totally overlooking here?
Keeping in mind I'm using a work laptop so I can't add Homebrew to install any additional software. And it's Mac OS X for the OS.