3 ms·
Why? No external dependencies, your code can run anywhere you have a Bash shell. This also means a smaller attack surface. Also readability: While some of the
by jascii 7y ago
Why? No external dependencies, your code can run anywhere you have a Bash shell. This also means a smaller attack surface.
Also readability: While some of the examples may be somewhat confusing to someone who doesn't have a lot of Bash experience, to someone who does it can be a lot more readable then feeding a string in yet another language to an external program and processing the output..
- munk-a 7y agoSed exists everywhere for a reasonably complete definition of everywhere - if it doesn't exist then you probably don't have access to Bash (and definitely not a fully featured one)
- jascii 7y agoI have managed networks with 1000+ (microwave link) network devices that had Bash but no sed.. Sure was nice to be able to script maintenance on those.. Your definition of "reasonably complete" might not work for everyone else's use case.