Created
October 10, 2017 19:00
-
-
Save scips/d312ac8225ec2ec494cd6fc30591dfec to your computer and use it in GitHub Desktop.
rename files bash
This file contains 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
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
for i in `ls | grep 360p`; do | |
NEWNAME=`echo $i | sed 's/ \[360p\]//'`; | |
echo $i " -> " $NEWNAME; | |
mv "$i" "$NEWNAME"; | |
done | |
IFS=$SAVEIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment