Skip to content

Instantly share code, notes, and snippets.

@taiar
Created September 18, 2022 16:20
Show Gist options
  • Save taiar/735ed3a3c5ee4f23ce39b2fe1073409c to your computer and use it in GitHub Desktop.
Save taiar/735ed3a3c5ee4f23ce39b2fe1073409c to your computer and use it in GitHub Desktop.
Subtitle cleaner
#!/usr/bin/bash
langs=( "ar" "es" "de" "fr" "it" "ja" "ru" "vi" "vi" "zh-CN" )
for session in *
do
if [ -d $session ]; then
echo $session
for resource in $session/*
do
echo - $resource
for lang in "${langs[@]}"
do
echo -- $lang
rm -f $resource/*.$lang.*
done
done
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment