1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env bash # Rename a whole directory of files to strings listed in a text file. j=1 for i in *; do mv "$i" "$(sed -n "$j"p ../fileNames.txt)"; j=$((j=j+1)); done