Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
chrisbroadfoot
· 14y ago · 0 comments
I often use cat and pipe to grep, it's nicer to have a left -> right flow.
Comments
[–]
ralph
14y ago
I don't like it, but you can do
<foo grep bar | ...
if you really want L-to-R whilst avoiding the redundant cat and its overhead. That doesn't allow grep to do its speed-ups though, because it's still reading stdin, not a filename.
[–]
lindvall
14y ago
Ends up that passing the file directly to grep will allow it to use tricks to make processing faster than reading from a pipe.