是否可以使用Windows版本Sed将带有时间码的文本文件更改为视频编辑软件Edius的格式?
%帧率3,0
00:00:00:00
00:00:00:00
00:01:06:15个
00:07:19:12个
00:09:52:03
我需要添加一个逗号/login
,然后将时间码添加到引号,
中,然后添加另一个逗号和两个引号"00:00:00:00"
,""
由于
答案 0 :(得分:0)
sed 's/^/,"/;s/$/",""/' file > file.out && mv file.out file
如果你正在使用Linux,它可以简化为
sed -i 's/^/,"/;s/$/",""/' file
或者,如果在MAC OS-X上,那么您需要
sed -i"" 's/^/,"/;s/$/",""/' file
IHTH
答案 1 :(得分:0)
$ sed 's/.*/,"&",""/' file
,"00:00:00:00",""
,"00:01:06:15",""
,"00:07:19:12",""
,"00:09:52:03",""