Skip to content

Instantly share code, notes, and snippets.

@esebastian
Last active March 6, 2019 19:37
Show Gist options
  • Save esebastian/d6446589969cde599839 to your computer and use it in GitHub Desktop.
Save esebastian/d6446589969cde599839 to your computer and use it in GitHub Desktop.
Mass rename TV show SRT files to match the MKV ones
for i in `ls *.mkv`; do [[ $i =~ [sS]([0-9]{2})[eE]([0-9]{2}) ]] && mv *${BASH_REMATCH[1]}x${BASH_REMATCH[2]}*.srt ${i%????}.srt 2> /dev/null; done
@hugows
Copy link

hugows commented Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment