I have plenty of text files like the attached one (view here, UTF-8 ).
The point of interest for the script is all the lines containing a value of seconds (a number with one decimal digit). The lines can be found easily because they all begin with "\ELANBegin" or "\ELANEnd". Here is an excerpt:
\ref NA071112-01_E.092
\cfn
\ELANBegin 268.1
\ELANEnd 271.2
\PAUSE 0.8
\ELANParticipant A
What the script shall do is to convert the highlighted number which represents seconds to a timestamp of the format hh:mm:ss:cs (i.e. hours:minutes:seconds:centiseconds)
for 268.1 the result would be 00:04:28:10
for 271.2 it would be 00:04:31:20
This result has to appear in round brackets after the decimal number. For the excerpt, the result would be
\ref NA071112-01_E.092
\cfn
\ELANBegin 268.1 (00:04:28:10)
\ELANEnd 271.2 (00:04:31:20)
\PAUSE 0.8
\ELANParticipant A



