Skip to content

Instantly share code, notes, and snippets.

@Jacajack
Created November 23, 2017 23:23
Show Gist options
  • Save Jacajack/cb59b09cc52fbde9e46cdc5e421fb260 to your computer and use it in GitHub Desktop.
Save Jacajack/cb59b09cc52fbde9e46cdc5e421fb260 to your computer and use it in GitHub Desktop.
Tired of renaming subtitle files to match with videos?
#Renames all files in the current directory containing pattern S..E.. in their names
#Extensions remain unchanged but names are simplified to just S..E..
#This routine can be put in .bashrc
function serialize( ) {
rename 's/.*(S\d\dE\d\d).*\.(.*)/$1.$2/i' *.*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment