I have educational videos that I am trying to burn to a DVD using Bombono DVD along with their corresponding subtitles. The subitles (.srt files) have the following format:

1 00:00:00,000 --> 00:00:02,000 In the video where we introduced the atom, I went

2 00:00:02,000 --> 00:00:06,000 off a bit about how at the center of an atom we have the

3 00:00:06,000 --> 00:00:09,000 nucleus, and it's actually a very small fraction of the


However, there are quite a few errors in the subtitles in which the time for a line is zero seconds. For example:

81 00:03:37,000 --> 00:03:37,000 a little bit faster.

When the DVD authoring software finds these lines, it cancels the entire DVD burning process. I can find out which line caused the error, but then I have to start the burn again before I know where the next one is.

My question is whether it is possible to create a script which will search all of the subtitles files and find all instances of repetition on a single line if I don't know what the exact string is that is repeated. Essentially, is it possible to show every line that has 12 characters repeat without specifying what those characters are (since they are different in every instance?)

Thanks for your help.

awk '$2 == $4 {print NR ":" $0}' filename

will output all the offending lines with the line number.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.