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