Created
May 22, 2017 18:30
-
-
Save rodriigomedeiros/8a57e3be65ef38aecebb6e815985163b to your computer and use it in GitHub Desktop.
Remove suffix in files from a directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -maxdepth 1 -regex '.*_suffix.jpg' -print0 | \ | |
while read -d '' -r; do | |
[[ $REPLY =~ $regex ]] && mv "$REPLY" "${BASH_REMATCH[1]}.jpg" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment