4 ms·
Additionally it costs almost nothing to run a cat, but some mental work to remember which programs are built to prevent it (accept filename argument). If they a
by loa_in_ 4y ago
Additionally it costs almost nothing to run a cat, but some mental work to remember which programs are built to prevent it (accept filename argument). If they are one can pass /proc/self/fd/0 as filename... That's some mindless tinkering that works so universally that it's just practical
- ithkuil 4y agoYou can reduce the cognitive overhead by using this pattern: Before: <input.txt sed ... | awk ... After: <input.txt grep bar | sed ... | awk .. Every new pipeline stage is just "command args |" and you insert it after the end of a previous command, treating the initial input redirect as the end of zeroth command
- deleted 4y ago[deleted]