Off by one fix to prevent possible segfault. Patch by jwestfall at surrealistic dot...
[FFMpeg-mirror/ordered_chapters.git] / clean-diff
blob3a6d19eede5199e622e6bdbdd8378b69aa79cacd
1 #!/bin/sh
2 sed '/^+[^+]/!s/ /TaBBaT/g' |\
3 expand -t `seq -s , 9 8 200` |\
4 sed 's/TaBBaT/ /g' |\
5 sed '/^+[^+]/s/ * $//' |\
6 tr -d '\015' |\
7 tr '\n' '°' |\
8 sed 's/\(@@[^@]*@@°[^@]*\)/\n\1/g' |\
9 egrep -v '@@[^@]*@@°(( [^°]*°)|([+-][[:space:]]*°)|(-[[:space:]]*([^°]*)°\+[[:space:]]*\5°))*$' |\
10 tr -d '\n' |\
11 tr '°' '\n'