我有一個名爲test
的輸入文件看起來像這樣通配符的grep問題Ubuntu的
leonid sergeevich vinogradov
ilya alexandrovich svintsov
,當我用grep這樣grep 'leonid*vinogradov' test
它說什麼,但是當我鍵入grep 'leonid.*vinogradov' test
它給了我第一個字符串。 *
和.*
有什麼區別?因爲我看不到任何數量的任何字符和任何字符後面跟着任何數量的任何字符。 我使用的是Ubuntu 14.04.3。
ty,我誤解了grep中通配符的含義 – user3880400