I have .srt files which are in the following format:
0
1
00:00:01,830 --> 00:00:04,740
corresponding text
1
2
00:00:05,280 --> 00:00:10,280
corresponding text
2
3
00:00:10,740 --> 00:00:14,640
corresponding text
3
4
00:00:15,510 --> 00:00:19,260
corresponding text
4
and that extra line with the line number is all the way through the subtitle (line 5, line 6...line 540).
I tried the command sed '/^[0-9]/ s/.//'
and as expected it replaces all the numbers, but I don't know how to make it replace only the second occurrence of each number in the range.
The expected result is:
0
1
00:00:01,830 --> 00:00:04,740
corresponding text
2
00:00:05,280 --> 00:00:10,280
corresponding text
3
00:00:10,740 --> 00:00:14,640
corresponding text
4
00:00:15,510 --> 00:00:19,260
corresponding text
How can I achieve it either with sed, awk or any tool that can do it in batches since there are several files with the same situation?
Thanks!