print | "mv \"" $0 "\" \"" out2 "\""
$ ls -1 file1.txt file2.txt pic0001.esp pic0002.esp $ cat file1.txt pic0001.esp pic0002.esp $ $ cat file2.txt Sony Red Cross $ $ sed -i 's/.*/"&.esp"/' file2.txt $ cat file2.txt "Sony.esp" "Red Cross.esp" $ $ paste -d " " file1.txt file2.txt | sed 's/^/mv /' > change.sh; sh change.sh $ ls change.sh file1.txt file2.txt Red Cross.esp Sony.esp $