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

UNIX? Shells by Example, Third Edition筆記1

系統 2075 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條評論
主站蜘蛛池模板: 土默特右旗| 渝北区| 崇阳县| 当阳市| 汝阳县| 天柱县| 玉树县| 清涧县| 哈尔滨市| 江安县| 页游| 灵丘县| 观塘区| 九龙坡区| 壶关县| 密云县| 河源市| 台州市| 丘北县| 濉溪县| 临城县| 潜江市| 道孚县| 历史| 克什克腾旗| 宜阳县| 平阴县| 墨江| 句容市| 金寨县| 黎川县| 九龙坡区| 荔波县| 理塘县| 株洲县| 平原县| 红安县| 麻城市| 永济市| 塘沽区| 都昌县|