1. 程式人生 > >shell 匹配單引號

shell 匹配單引號

nbsp shell ubun match 符號 abcd googl -i 最簡

https://stackoverflow.com/questions/91110/how-to-match-a-single-quote-in-sed

今天在看一個例子 sed ‘/Larry\‘s‘ Larry。 結果死活匹配不到。查詢了google才知道。匹配單引號不能簡單用轉義符號\

最簡單的是用雙引號來輸入命令

或者

[email protected]:/home/koyaku# sed -e ‘/Larry‘\‘‘/p‘ Larry
abcd
efgh larry
Larry‘s Address
Larry‘s Address
abcd
efgg

好多引號。

shell 匹配單引號