基础正则表达式 提示:有规律,可以拆解开,单个意思是相通的 1)查找特定字符 查看the所在位置 grep -n 'the' test.txt 反之,查看不包含在the所在位置行 grep -vn 'the' test.txt 2)查找集合字符 首尾是sh、rt中间是i或o其中一个 grep -n 'sh[io]rt' test.txt