請問sed 多行取代 - Linux

Rachel avatar
By Rachel
at 2017-06-06T01:29

Table of Contents

如題,
是否有方式可以將
AB/
CD/
EF/
同時替換成
12/
34/
56/

不以行數或是抓頭尾數值的方式
謝謝~

--
Tags: Linux

All Comments

Catherine avatar
By Catherine
at 2017-06-07T18:30
? 你是要 sed -e script 這種嗎? (也可用 ;)
Vanessa avatar
By Vanessa
at 2017-06-08T15:57
先把\n替換成%之類的 然後sed AB%CD%EF to 12%34%56
Mia avatar
By Mia
at 2017-06-12T01:00
不能分開做嗎?
Edith avatar
By Edith
at 2017-06-13T01:14
sed ... | sed ... | sed ... 這樣?
Selena avatar
By Selena
at 2017-06-16T05:50
sed -e 's/AB/12/g;s/CD/34/g;s/EF/56/g' test.txt
Christine avatar
By Christine
at 2017-06-19T11:37
不知道能不能像vim的substitute用字典檔的方式取代

小筆電的無法正常開機

Susan avatar
By Susan
at 2017-06-04T22:38
我的版本是ubuntu16.04 平常都哪來上網 今天開機就出現這樣 http://i.imgur.com/mK5DmsJ.jpg 有大大可以幫我解答一下 ----- Sent from JPTT on my HTC_B810x. - ...

在fb發現onlyoffice比起libreoffice如何

Delia avatar
By Delia
at 2017-06-04T15:49
我在fb社群看到有一篇介紹linux office軟體的文章 他推荐onlyoffice而不是WPS或是libreoffice 現在那麼多款office哪一個windows office兼容度最高呢 電腦還是libreoffice平常只是拿來開文獻 沒有用他來產出文件 有沒有人比較這幾個offic ...

hostapd錯誤訊息

Annie avatar
By Annie
at 2017-06-03T16:17
Failed to create interface mon.wlan0: -95 (Operation not supported) wlan0: Could not connect to kernel driver 用rasp pi 3架設ap, hostapd跑起來時 一直出現上述的錯誤 請問有人遇 ...

參數/變數 置換

Daph Bay avatar
By Daph Bay
at 2017-06-01T23:12
我有一個test_csh如下 #! /bin/csh set now_shell = and#34;test_cshand#34; set show_me = and#34;inside_shelland#34; echo and#34;$now_shell : $showand#34; 請問 ...

sudo security issue

Kyle avatar
By Kyle
at 2017-06-01T03:54
各位晚安: 經友人資訊分享, sudo官方公佈[1]一個安全性的更新[2], 部分sudo版本確認受到影響, 敬請系統中有安裝sudo的使用者留意更新。 Reference: [1] https://www.sudo.ws/alerts/linux_tty.html [2] https://www ...