我有一些大的文件(大於2GB),並在文件中的文本格式如下:搜索並替換大文件的每行中的第一個分隔符?
2013/4/18;22:5:42.668;13266;10;13279;10
2013/4/18;22:10:48.820;13271;10;13279;10
2013/4/18;22:12:0.956;13266;10;13279;10
2013/4/18;22:12:44.826;13266;10;13284;10
...
我想完成以下任務
- replace the 1st semi-colon ";" in each line to space character " "
- replace the rest semi-colon ";" in each line to comma character ","
輸出應該像下面那樣
2013/4/18 22:5:42.668,13266,10,13279,10
2013/4/18 22:10:48.820,13271,10,13279,10
2013/4/18 22:12:0.956,13266,10,13279,10
2013/4/18 22:12:44.826,13266,10,13284,10
...
任何人都可以請告訴我怎麼做?
你有emacs嗎?如果你有'sed',在emacs – Nullpointer
'sed -e's;;//'-e's /; /,/ g''裏很容易。 –
@JonathanLeffler窗戶有'sed'嗎? – Nullpointer