grep -n 'the' 123.txt 搜索the字符 -----------搜尋特定字串
grep -n 't[ea]st' 123.txt 搜索test或taste两个字符---------利用 [] 來搜尋集合字元
grep -n '[^g]oo' 123.txt 搜索前面不为g的oo-----------向選擇 [^]
grep -n '[0-9]' 123.txt 搜索有0-9的数字
grep -n '^the' 123.txt 搜索以the为行首-----------行首搜索^
grep -n '^[^a-zA-Z]' 123.txt 搜索不以英文字母开头
grep -n '[a-z]$' 123.txt 搜索以a-z结尾的行---------- 行尾搜索$
grep -n 'g..d' 123.txt 搜索开头g结尾d字符----------任意一個字元 .
grep -n 'ooo*' 123.txt 搜索至少有两个oo的字
符---------重複字元 *