我有一個文件,偶爾會有分割線。sed:根據第四個連接線
拆分是通過兩個連續的字母字符串來表示的。
5 00:00:00,000 --> 00:00:00,000 Alphabetic characters Alphabetic characters 6 00:00:00,000 --> 00:00:00,000 Alphabetic characters 7 00:00:00,000 --> 00:00:00,000 Alphabetic characters Alphabetic characters 8 00:00:00,000 --> 00:00:00,000 Alphabetic characters .....
我想加盟分割線回:
5 00:00:00,000 --> 00:00:00,000 Alphabetic characters Alphabetic characters 6 00:00:00,000 --> 00:00:00,000 Alphabetic characters 7 00:00:00,000 --> 00:00:00,000 Alphabetic characters Alphabetic characters 8 > 00:00:00,000 --> 00:00:00,000 Alphabetic characters Alphabetic characters .....
使用SED。我不清楚如何加入前一行。 有什麼建議嗎?
如果它是一個SRT文件,那麼在最後一行文本之後有一個空白行(在字幕索引之前),與您的示例不同。 –
你可以[編輯]你的問題,因爲它不能反映有效的.SRT文件的實際格式。所以基於你的例子的解決方案將不會令人滿意。 –
帶有四個空格的前綴行。請看[編輯幫助](http://stackoverflow.com/editing-help)。 – Cyrus