Username:   Password:  

Bash script to append a .txt extension to a filename

for i in *.log*; do mv "$i" "$i.txt"; done
 

Iterate over the current directory, get all files with .log and append .txt to the end of the entire filename:

Tags

bash files iterate filename