{"id":156593,"date":"2019-09-09T09:23:58","date_gmt":"2019-09-09T01:23:58","guid":{"rendered":"https:\/\/gulass.cn\/?p=156593"},"modified":"2019-08-26T09:24:53","modified_gmt":"2019-08-26T01:24:53","slug":"linux-unix-grep","status":"publish","type":"post","link":"https:\/\/gulass.cn\/linux-unix-grep.html","title":{"rendered":"\u6559\u4f60\u5982\u4f55\u5728Linux\u6216Unix\u4e0a\u4f7f\u7528grep\u8ba1\u7b97\u5355\u8bcd\u51fa\u73b0\u6b21\u6570"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u60f3\u77e5\u9053\u4e00\u4e2a\u5355\u8bcd\uff08\u6bd4\u5982linuxidc\u6216IP\u5730\u5740\uff09\u5728\u6587\u672c\u6587\u4ef6\u4e2d\u51fa\u73b0\u4e86\u591a\u5c11\u6b21\u5417\uff1f\u5728Linux\u6216\u7c7bUnix\u7cfb\u7edf\u4e0a\u53ef\u4ee5\u4f7f\u7528grep\u547d\u4ee4\u6765\u5b9e\u73b0\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u60a8\u53ef\u4ee5\u4f7f\u7528grep\u547d\u4ee4\u641c\u7d22\u7ed9\u5b9a\u6a21\u5f0f\u7684\u5b57\u7b26\u4e32\uff0c\u5355\u8bcd\uff0c\u6587\u672c\u548c\u6570\u5b57\u3002 \u60a8\u53ef\u4ee5\u5c06-c\u9009\u9879\u4f20\u9012\u7ed9grep\u547d\u4ee4\u3002 \u5b83\u4ec5\u663e\u793a\u6bcf\u4e2a\u6587\u4ef6\u5339\u914d\u6a21\u5f0f\u7684\u6b21\u6570\u3002<\/p>\n \u663e\u793a\u5355\u8bcdlinuxidc\u5728\u540d\u4e3alinuxidc.txt\u7684\u6587\u4ef6\u4e2d\u51fa\u73b0\u7684\u603b\u6b21\u6570<\/strong><\/span><\/div>\n \u8bed\u6cd5\u662f\uff1a<\/p>\n grep -c string\uff08\u5b57\u7b26\u4e32\uff09 filename\uff08\u6587\u4ef6\u540d\uff09\r\n\r\n[linuxidc@localhost www.linuxidc.com]$\u00a0grep -c linuxidc linuxidc.txt<\/pre>\n |