当前位置: 首页 > Linux

Linux-管道+过滤器

时间:2023-04-06 03:09:18 Linux

filterviewfiltercommandfiltercommand:grepcontainscontent(filtercondition)grepfilter经常和pipeline结合使用,比如filterviewpipeline命令格式:command1|command2usestheoutputofthe前一个命令作为命令的后输入ls|grep内容猫文件名|grep内容[root@locahost2020-3-6]#lsa.cppb.cppc.cppchong.cnewtar.tgzrechong.c[root@locahost2020-3-6]#ls|grep.ca.cppb.cppc.cppchong.crechong.c[root@locahost2020-3-6]#lsa.cppb.cppc.cppchong.cnewtar.tgzrechong.c[root@locahost2020-3-6]#ls-l|grepn-rw-r--r--1rootroot10Mar712:20chong.c-rw-r--r--1rootroot458Mar714:53newtar.tgz-rw-r--r--1rootroot0Mar712:21rechong.c