Last active
December 27, 2015 16:08
-
-
Save mmstick/9002902 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
if [ "$1" == "" ]; then | |
printf "Enter Season Name: "; read season | |
else | |
season="$1" | |
fi | |
if [ "$2" == "" ]; then | |
printf "Enter Season ID : "; read id | |
else | |
id="$2" | |
fi | |
episodeNum=1 | |
for episode in *.mkv; do | |
episodeName=$(printf "%s %sx%02d.mkv" "$season" "$id" "$episodeNum") | |
mv -i -v "$episode" "$episodeName" | |
let episodeNum+=1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment