<em id="0a85b"><option id="0a85b"></option></em>

<abbr id="0a85b"></abbr>

      <nobr id="0a85b"></nobr>
        <tr id="0a85b"></tr>
        9久久伊人精品综合,亚洲一区精品视频在线,成 人免费va视频,国产一区二区三区黄网,99国产精品永久免费视频,亚洲毛片多多影院,精品久久久无码人妻中文字幕,无码国产欧美一区二区三区不卡
        學習啦 > 學習電腦 > 操作系統 > Linux教程 > linux中grep命令的詳細解釋(2)

        linux中grep命令的詳細解釋(2)

        時間: 佳洲1085 分享

        linux中grep命令的詳細解釋

          三、linux的grep命令的用法大全

          查找特定字符串并顏色顯示

          [root@ www.linuxidc.com]# grep -n 'the' regular_express.txt --color=auto

          8:I can't finish the test.

          12:the symbol '*' is represented as start.

          15:You are the best is mean you are the no. 1.

          16:The world <Happy> is the same with "glad".

          18:google is the best tools for search keyword.

          反向選擇查找特定字符串并顏色顯示

          [root@ www.linuxidc.com]# grep -vn 'the' regular_express.txt --color=auto

          1:"Open Source" is a good mechanism to develop programs.

          2:apple is my favorite food.

          ......

          忽略大小寫查找特定的字符

          [root@ www.linuxidc.com]# grep -in 'the' regular_express.txt

          使用 [] 來查找集合字符:

          [root@ www.linuxidc.com]# grep -n 't[ae]st' regular_express.txt

          8:I can't finish the test.

          9:Oh! The soup taste good.

          查找有‘oo’字符串

          [root@ www.linuxidc.com]# grep -n 'oo' regular_express.txt

          1:"Open Source" is a good mechanism to develop programs.

          2:apple is my favorite food.

          3:Football game is not use feet only.

          9:Oh! The soup taste good.

          18:google is the best tools for search keyword.

          19:goooooogle yes!

          查找有‘oo’字符串,但是不要前面有g的,即剔除goo

          [root@ www.linuxidc.com]# grep -n '[^g]oo' regular_express.txt

          2:apple is my favorite food.

          3:Football game is not use feet only.

          18:google is the best tools for search keyword.

          19:goooooogle yes!

          查找非小寫字母加oo的內容

          [root@ www.linuxidc.com]# grep -n '[^a-z]oo' regular_express.txt

          3:Football game is not use feet only.

          獲取有數字的一行

          [root@ www.linuxidc.com]# grep -n '[0-9]' regular_express.txt

          5:However, this dress is about $ 3183 dollars.

          15:You are the best is mean you are the no. 1.

          [root@ www.linuxidc.com]# grep -n '[^[:lower:]]oo' regular_express.txt

          3:Football game is not use feet only.

          查詢以the開頭的字符

          [root@ www.linuxidc.com]# grep -n '^the' regular_express.txt

          12:the symbol '*' is represented as start.

          查詢開頭是小寫字母的內容

          [root@ www.linuxidc.com]# grep -n '^[a-z]' regular_express.txt

          2:apple is my favorite food.

          4:this dress doesn't fit me.

          10:motorcycle is cheap than car.

          12:the symbol '*' is represented as start.

          18:google is the best tools for search keyword.

          19:goooooogle yes!

          20:go! go! Let's go.

          查詢第一個字符不是大寫的

          [root@ www.linuxidc.com]# grep -n '^[[:lower:]]' regular_express.txt

          2:apple is my favorite food.

          4:this dress doesn't fit me.

          10:motorcycle is cheap than car.

          12:the symbol '*' is represented as start.

          18:google is the best tools for search keyword.

          19:goooooogle yes!

          20:go! go! Let's go.

          查詢不是以英文開頭的字符

          [root@ www.linuxidc.com]# grep -n '^[^a-zA-Z]' regular_express.txt

          1:"Open Source" is a good mechanism to develop programs.

          21:# I am VBird

          查詢結尾是小數點的行的內容.

          [root@ www.linuxidc.com]# grep -n '\.$' regular_express.txt

          1:"Open Source" is a good mechanism to develop programs.

          2:apple is my favorite food.

          3:Football game is not use feet only.

          4:this dress doesn't fit me.

          10:motorcycle is cheap than car.

          11:This window is clear.

          12:the symbol '*' is represented as start.

          15:You are the best is mean you are the no. 1.

          16:The world <Happy> is the same with "glad".

          17:I like dog.

          18:google is the best tools for search keyword.

          20:go! go! Let's go.

          查找“空白行”

          [root@ www.linuxidc.com]# grep -n '^$' regular_express.txt

          22:

          通配符.和*的使用,.(小數點)代表一定有一個任意字符,*代表重復前一個到無窮多次的意思

          [root@ www.linuxidc.com]# grep -n 'g..d' regular_express.txt

          1:"Open Source" is a good mechanism to develop programs.

          9:Oh! The soup taste good.

          16:The world <Happy> is the same with "glad".

          查詢出現任意數字的行列

          [root@ www.linuxidc.com]# grep -n '[0-9][0-9]*' regular_express.txt

          5:However, this dress is about $ 3183 dollars.

          15:You are the best is mean you are the no. 1.

          查詢出現兩個o的字符串

          [root@ www.linuxidc.com]# grep -n 'o\{2\}' regular_express.txt

          1:"Open Source" is a good mechanism to develop programs.

          2:apple is my favorite food.

          3:Football game is not use feet only.

          9:Oh! The soup taste good.

          18:google is the best tools for search keyword.

          19:goooooogle yes!

          查詢出現2-5個o的字符串,后面在接一個g的字符串

          [root@ www.linuxidc.com]# grep -n 'o\{2,5\}g' regular_express.txt

          18:google is the best tools for search keyword.

          19:goooooogle yes!

          查詢出現2個以上o的字符串,后面在接一個g的字符串

          [root@ www.linuxidc.com]# grep -n 'o\{2,\}g' regular_express.txt

          18:google is the best tools for search keyword.

          19:goooooogle yes!

        3635284 主站蜘蛛池模板: 中国老太婆video| 国产成人亚洲精品成人区| 偷偷做久久久久免费网站| 精品国产福利久久久| 国产亚洲精品第一综合另类无码无遮挡又大又爽又黄的视频 | 亚洲午夜精品国产电影在线观看| 久久69国产精品久久69软件| 99久久亚洲精品影院| 中文字幕精品亚洲二区| 国产一级黄色av影片| 亚洲精品一区二区在线播| 欧洲码亚洲码的区别入口 | 性欧美VIDEOFREE高清大喷水| 国产偷自视频区视频| 国产农村妇女一区二区三区| 久久国产精品不只是精品| 熟女精品色一区二区三区| 东方av四虎在线观看| 成在人线av无码免观看午夜网| 国产AV永久无码青青草原| 国产午夜福利视频一区二区| 国产高清在线不卡一区| 黄频在线播放观看免费| 人妻无码av中文系列久| 欧美性大战久久久久XXX| 亚洲综合伊人久久大杳蕉| 日韩欧美中文字幕在线精品| 四虎在线成人免费观看| 精品国产亚洲午夜精品a| 在线国产精品中文字幕| 蜜桃av一区二区高潮久久精品| AV无码国产在线看岛国岛| 亚洲嫩模一区二区三区视频| 九九热这里只有精品在线| 黑人巨大videos极度另类| 国产午夜一区二区在线观看| 最新国产精品亚洲| 久久精品日日躁夜夜躁| 国产午夜精品在人线播放| 黄色免费在线网址| 亚洲Av综合日韩精品久久久|