Skip to content

Instantly share code, notes, and snippets.

@glamorous
Created April 8, 2012 09:30
Show Gist options
  • Save glamorous/2336254 to your computer and use it in GitHub Desktop.
Save glamorous/2336254 to your computer and use it in GitHub Desktop.
Rename subtitles with .nl suffix
# First test if this is what you want it to do
find . -type f -name "*.srt" | awk '{print("mv \""$0"\" \""$0"\"")}' | sed 's/\.srt/\.nl\.srt/2'
# Second if everything seems wright, do it!
#find . -type f -name "*.srt" | awk '{print("mv \""$0"\" \""$0"\"")}' | sed 's/\.srt/\.nl\.srt/2' | /bin/sh
# Exclude already correct subtitles
#find . -type f -name "*.srt" -not -name "*.nl.srt" | awk '{print("mv \""$0"\" \""$0"\"")}' | sed 's/\.srt/\.nl\.srt/2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment