3 ms·
As an alternative, you can always rewrite: cat file | grep xyz To: <file grep xyz
by gav 13y ago
As an alternative, you can always rewrite:
cat file | grep xyz
To:
<file grep xyz
- e12e 13y agoNo? Maybe you meant "grep xyz <file" ? In what shell does your line accomplish the same thing? [edit: Ah, I had an extra pipe in there. "<file command args" does indeed work --- "<file | command args" does not]
- abecedarius 13y agoJust a cute tangent: I once wrote a shell with no built-in redirection. You executed a program named "<" for that, like your second example but with a space: < file grep xyz (The trouble with this design: it doesn't generalize well to pipes.)