小编Lee*_*Lee的帖子

Why the pipe command "l | grep "1" " get the wrong result?

As the picture illustrates, I use l to get the file in the current folder. And then I want to get the file with number 1, so I use the pipe and the grep.

But why the 2 and 22 file show out? And what is the 1;34m?

$ l
./ ../ 1 11 2 22
$ l | grep "1"
1;34m./ 1;32m../ 1 11 2 22
Run Code Online (Sandbox Code Playgroud)

Update

I have already alias the command l in my …

command-line grep ls pipe

13
推荐指数
2
解决办法
2569
查看次数

标签 统计

command-line ×1

grep ×1

ls ×1

pipe ×1