Skip to content

Instantly share code, notes, and snippets.

View hisener's full-sized avatar

Halil İbrahim Şener hisener

View GitHub Profile
@hisener
hisener / convert-subtitle.sh
Created August 3, 2016 14:47
Convert subtitles' encoding to UTF-8
#!/bin/bash
OIFS="$IFS"
IFS=$'\n'
find ./ -name "*.srt" -type f |
while read file
do
if ! [[ `file -bi "$file"` =~ utf-8$ ]]
then

three hyphen --- to get a 0.05 pt line,

three underscore ___ or three equal sign === to get a 1.0 pt line

three asterisk *** to get a combined line thin over fat

three tilde ~~~ to get a combined line fat over thin

three hash ### to get a double line.

#!/usr/bin/env bash
echo "----- Positional Parameters -----"
echo $0
echo $1
echo $2
echo $#
echo "----- All the positional parameters -----"