日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

UNIX? Shells by Example, Third Edition筆記1

系統 2139 0
1. grep 's Regular Expression Metacharacters(Which I always dismissed~)
[^] Matches one character not in the set '[^A–K]ove' Matches lines not containing a character in the range A through K, followed by ove.
\< Beginning-of-word anchor '\<love' Matches lines containing a word that begins with love.
\> End-of-word anchor 'love\>' Matches lines containing a word that ends with love.
\(..\) Tags matched characters '\(love\)ing' Tags marked portion in a register to be remembered later as number 1. To reference later, use \ 1 to repeat the pattern. May use up to nine tags, starting with the first tag at the left-most part of the pattern. For example, the pattern love is saved in register 1 to be referenced later as \ 1.
x\{m\} x\{m,\} x\{m,n\} [a] Repetition of character x: m times, at least m times, or between m and n times 'o\{5\}' 'o\{5,\}' 'o\{5,10\}' Matches if line has 5 occurences of o , at least 5 occurences of o , or between 5 and 10 occurrences of o .


EXPLANATION

Prints the line if it contains the word north. The \< is the beginning-of-word anchor, and the \> is the end-of-word anchor.

4. grep 's Options

Option What It Does
–b Precedes each line by the block number on which it was found. This is sometimes useful in locating disk block numbers by context.
–c Displays a count of matching lines rather than displaying the lines that match.
–h Does not display filenames.
–i Ignores the case of letters in making comparisons (i.e., upper-- and lowercase are considered identical).
–l Lists only the names of files with matching lines (once), separated by newline characters.
–n Precedes each line by its relative line number in the file.
–s Works silently, that is, displays nothing except error messages. This is useful for checking the exit status.
–v Inverts the search to display only lines that do not match.
–w Searches for the expression as a word, as if surrounded by \< and \>. This applies to grep only. (Not all versions of grep support this feature; e.g., SCO UNIX does not.)



UNIX? Shells by Example, Third Edition筆記1


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 宣汉县| 车致| 禹城市| 五常市| 大冶市| 河曲县| 井陉县| 榆林市| 龙里县| 宜昌市| 龙海市| 泽普县| 南汇区| 蕲春县| 静乐县| 大渡口区| 泰安市| 股票| 海宁市| 通渭县| 洪湖市| 增城市| 深泽县| 大埔区| 合肥市| 平邑县| 罗田县| 大渡口区| 略阳县| 大方县| 盐源县| 贵定县| 南康市| 青岛市| 建始县| 东丰县| 屯留县| 万山特区| 长汀县| 固原市| 石棉县|