已采納回答 / Keeln
因為沒有加入定界符,如老師所講的,需要在查找字符的前后都加入定界符才可實現(xiàn)精確查找,grep "xc\{2,3\}u" test.txt 像這樣在前面加入定界符才可以精確查找,指從x起查找2-3個c;而grep "c\{2,3\}u"是說查找2-3個c,分別從第一個c,第二個c,第三個c查找,都可以滿足條件。這就是模糊匹配。
2016-04-06
最新回答 / mopery
info sed =>`-n'`--quiet'`--silent'? ? ?By default, `sed' prints out the pattern space at the end of each? ? ?cycle through the script (*note How `sed' works: Execution Cycle.).? ? ?These options disable this automatic printing, and `sed' only? ? ?produ...
2016-01-03
已采納回答 / onemoo
命令后的字符串就會被當作各個參數(shù),所以你這兩個寫法沒有區(qū)別。雙引號括起來的字符會被當作一個字符串,如果字符串中有空格,那也會被當作一個帶空格的字符串,而不會被看作是由空格分開的兩個字符串。還有,shell會對命令中的字符串做一些處理,如路徑展開、花括號展開、波浪線展開...,加上雙引號后就只有算術展開、變量展開和命令展開有效了。比如對于路徑展開:<...code...>
2015-08-13