請問一個sed處理文字檔的的寫法 - Linux
By Mia
at 2017-08-21T17:02
at 2017-08-21T17:02
Table of Contents
請問一個問題,我有一個文字檔0.txt如下:
123,"123,123",789,876,
123,456,789,876,
123,456,789,123,"456,456",
111,222,333,444,555
請問我要如何使用sed指令,去掉雙引號以及雙引號裡面的逗點,使檔案變成如下的檔案?
123,123123,789,876,
123,456,789,876,
123,456,789,123,456456,
111,222,333,444,555
謝謝大家。
我的寫法如下,但是不對。
sed "/\"/,/\"/s/\,//" 0.txt
--
123,"123,123",789,876,
123,456,789,876,
123,456,789,123,"456,456",
111,222,333,444,555
請問我要如何使用sed指令,去掉雙引號以及雙引號裡面的逗點,使檔案變成如下的檔案?
123,123123,789,876,
123,456,789,876,
123,456,789,123,456456,
111,222,333,444,555
謝謝大家。
我的寫法如下,但是不對。
sed "/\"/,/\"/s/\,//" 0.txt
--
Tags:
Linux
All Comments
By Lydia
at 2017-08-24T08:13
at 2017-08-24T08:13
By Suhail Hany
at 2017-08-28T08:17
at 2017-08-28T08:17
By Andrew
at 2017-08-29T20:19
at 2017-08-29T20:19
By Zenobia
at 2017-08-31T05:18
at 2017-08-31T05:18
By Brianna
at 2017-08-31T11:59
at 2017-08-31T11:59
By Kelly
at 2017-09-04T01:36
at 2017-09-04T01:36
By Gary
at 2017-09-04T23:49
at 2017-09-04T23:49
By Susan
at 2017-09-05T19:08
at 2017-09-05T19:08
By Xanthe
at 2017-09-10T10:50
at 2017-09-10T10:50
By Damian
at 2017-09-15T01:52
at 2017-09-15T01:52
By Gary
at 2017-09-17T03:27
at 2017-09-17T03:27
By Ethan
at 2017-09-20T18:33
at 2017-09-20T18:33
By Jacob
at 2017-09-22T21:31
at 2017-09-22T21:31
By Megan
at 2017-09-26T21:15
at 2017-09-26T21:15
By Ula
at 2017-09-29T10:38
at 2017-09-29T10:38
By Kumar
at 2017-10-02T06:45
at 2017-10-02T06:45
By Hedda
at 2017-10-04T01:36
at 2017-10-04T01:36
By Oscar
at 2017-10-04T20:35
at 2017-10-04T20:35
Related Posts
motion跟sh跟py還有telegram bot的問題
By Zora
at 2017-08-21T12:58
at 2017-08-21T12:58
Ubuntu快速鍵有時有有時沒有
By Jacob
at 2017-08-19T00:25
at 2017-08-19T00:25
chrome每次都會出現『未正確關閉』
By Poppy
at 2017-08-18T22:25
at 2017-08-18T22:25
ubuntu unity 用起來很慢
By Yedda
at 2017-08-18T17:27
at 2017-08-18T17:27
請問有推薦適合用在平板的Linux嗎?
By Agatha
at 2017-08-18T11:31
at 2017-08-18T11:31