企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
#### grep ``` 从文件中搜索内容 ``` 搜索test.txt中是否存在test字符串 ``` root@ecs-a672-0002:/home/test# grep test test.txt test ``` 行号 ``` root@ecs-a672-0002:/home/test# grep -n test test.txt 7:test ``` ``` -v 搜索不存在的行 ``` 有多少行匹配 ``` root@ecs-a672-0002:/home/test# grep -c test test.txt 1 root@ecs-a672-0002:/home/test# grep -vc test test.txt 11 ```