I'd like to grep
and open
a file in just one terminal command.
Suppose I'm in this directory:
$ ls
1.txt 2.txt 3.txt 4.txt 5.txt
and I want to open 3.txt
I thought I could do ls | grep 3 | open
but it looks like open
doesn't accept piped input. Is there any way to do this?