3 ms·
Anybody knows if some shells apply these easy optimizations? Could a shell detect cat abuse and replace it with the right grep incantation?
by mejutoco 4y ago
Anybody knows if some shells apply these easy optimizations? Could a shell detect cat abuse and replace it with the right grep incantation?
- thewakalix 4y agocat and grep generally aren't builtins, so shells can't rely on them to have any particular behavior.
- gpderetta 4y agoCat could use splice and basically reduce the overhead to nothing. It possibly already does.
- MisterTea 4y ago> Could a shell detect cat abuse and replace it with the right grep incantation? That sounds like shell abuse via bloat.
- mejutoco 4y agoNot saying it is necessarily a good idea, just curious if any such optimization is possible. It seems (from thewakalix comment above) not being a built in it would not be possible. Now we only need to remove the other 100% of the bloat in the shell ;)