how to batch file rename in bash shell

This is a quick way of renaming a batch of files matching a reg exp in bash.

ls foo*.jpg | awk '{print("mv "$1" "$1)}' | sed 's/foo/bar/2' | /bin/sh


Posted

in

by

Tags:

Comments

Leave a Reply