Advertisement
fant0men

Split and add to SRT subtitles

Jul 23rd, 2015
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. cat X-Men.Days.of.Future.Past.2014.1080p-720p.BluRay.x264.YIFY.Eng.srt | while read line; do if [[ $line =~ 550 ]]; then set=550; fi; if [[ $set -eq 550 ]]; then echo "$line" >> split.srt; fi; done
  2.  
  3.  
  4. cat split2.srt | while read line; do if [[ "$line" =~ [*[:digit:]] && ! "$line" =~ [[:alpha:]] && ! "$line" =~ "-->" ]]; then echo "$line"; fi; done
  5.  
  6.  
  7. cat split2.srt | while read line; do line2="$line"; if [[ "$line2" =~ [*[:digit:]] && ! "$line" =~ [[:alpha:]] && ! "$line" =~ "-->" ]]; then line2=$(echo "$line2" | tr -d '[:cntrl:]'); (( line2 += 550 )); echo $line2; fi; echo "$line2" >> split3.srt; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement