Last active
December 1, 2016 21:38
-
-
Save urosgruber/5400fdcc97e74fffff5bd8e79edb9b6a to your computer and use it in GitHub Desktop.
Remove portion of filename from list of files
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
| ## this will remove -fs8 from files like foobar1-fs8.png | |
| for filename in *.png; do | |
| [ -f "$filename" ] || continue | |
| mv $filename ${filename//\-fs8/} | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment