Skip to content

Instantly share code, notes, and snippets.

@scips
Created October 10, 2017 19:00
Show Gist options
  • Save scips/d312ac8225ec2ec494cd6fc30591dfec to your computer and use it in GitHub Desktop.
Save scips/d312ac8225ec2ec494cd6fc30591dfec to your computer and use it in GitHub Desktop.
rename files bash
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