← All posts tagged pipe

CheshaNeko

#!/bin/bash
TMP_FILE=${1/%.mkv/.tmp}
ASS_FILE=${1/%.mkv/.ass}
ARGS=`mkvinfo $1 |grep ChapterTime |awk '(NR==2||NR==4)'|sed s/'|.*: '// |sed ':a; /$/N; s/\n/\ /; ta'`
mkv_cut.py $ARGS < $ASS_FILE > $TMP_FILE
cat $TMP_FILE > $ASS_FILE
rm $TMP_FILE

ЖИЗНЬ ЗА АНИМЕ!!!11111