Write a shell script to take a directory_path, a filename_pattern and a new_filename as input. Rename all files in directory which matches filename_pattern to {new_filename}_{count}.txt code example
Example 1: bash rename multiple files pattern
rename 's/^/MyVacation2011_/g' *.jpg
Example 2: bash rename multiple files pattern
for f in *.jpg; do mv "$f" "$(echo "$f" | sed s/IMG/VACATION/)"; done