I would like to change a file extension from
*.text. I tried using the
basename command, but I'm having trouble on changing more than one file.
Here's my code:
files=`ls -1 *.txt` for x in $files do mv $x "`basename $files .txt`.text" done
I'm getting this error:
basename: too many arguments Try basename --help' for more information