Skip to content

Instantly share code, notes, and snippets.

@gonaumov
Created December 29, 2020 13:34
Show Gist options
  • Save gonaumov/f257fb63a2d1bfef2929ee9f7f349424 to your computer and use it in GitHub Desktop.
Save gonaumov/f257fb63a2d1bfef2929ee9f7f349424 to your computer and use it in GitHub Desktop.
# There was need to convert subtitles encoding in a directory. We - me and my wife use one Ubuntu desktop box
# to watch movies. Linux users are used to meet these specific encoding problems if there is cirillyc.
# I wrote this one liner in order to convert all subtitles in a directory.
# xargs rocks - in that case xargs executes recode windows-1251 for every file which has extenstion .srt
ls -A1 | egrep "\.srt'?$" | xargs -n 1 recode windows-1251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment