original file: a really really long name with spaces.ext
target file: the same name.new-ext
command: mv *part of the name that'll give a unique answer.ext $(echo $(ls -l | grep -i *.ext | cut -d ' ' -f 11-))
result: mv: target 'last word of the name.ext': No such file or directory
What am I doing wrong?
PS: the remote machine only allows sh
(not even bash) so tab-completion is out of the picture.
grep -i *.ext
probably doesn't do what you intend – jhnc Dec 11 '23 at 09:23