Com a abordagem única gawk para arquivos relativamente pequenos (por tamanho):
awk 'BEGIN{ RS=""; FS="[[:space:]]+" }
{ c++;
a[c]["t"]=$1;
a[c]["s"]=substr($0,length($1)+2)
}
END {
len=length(a);
for(i=1;i<=len;i++) {
if((i+1)<=len){ printf("%s --> %s\n%s\n\n",a[i]["t"],a[i+1]["t"],a[i]["s"]) }
else { printf("%s\n%s\n",a[i]["t"],a[i]["s"]) }
}
}' file
A saída:
00:00:10.730 --> 00:00:13.230
this presentation is delivered by the
00:00:13.230 --> 00:00:14.610
Stanford center for professional
00:00:14.610 --> 00:00:25.500
development okay so let's get started
00:00:25.500 --> 00:00:32.399
with today's material so um welcome back
00:00:32.399
to the second lecture what I want to do