grep和管道

1.管道命令:

可以连接多个Linux命令

命令1 | 命令2 | 命令3

2.grep  正则表达式  从文件或者字符串中搜索字符串

格式:grep  ‘’  file

返回符合规则的行

需求:查询当前目录下,文件名带有t关键字的文件

fight@DESKTOP-DSQTDMO:~$ ls | grep c
cc.txt

 option: -i  ignore capital and small letter

 

posted @ 2017-12-03 10:20  fight139  阅读(1517)  评论(0编辑  收藏  举报