[問題] sed 用法請教

看板Linux作者 (paladin)時間7年前 (2017/02/28 09:47), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
以下是centos7 /etc/init.d/network 裡的某幾行, 第二行應該是d command, 但d前面的address部分不知如何解釋? ------------------------------------------------------ sed -e "$__sed_discard_ignored_files" \ -e '/\(ifcfg-lo$\|:\|ifcfg-.*-range\)/d' \ -e '{ s/^ifcfg-//g;s/[0-9]}/ &/}' | \ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 182.235.5.18 ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1488246439.A.315.html

02/28 11:46, , 1F
沒有 -E 的話 regex 裏面的 \(\) \| 和 () | 意義是反過來的
02/28 11:46, 1F
文章代碼(AID): #1OjDQdCL (Linux)