3 ms·
Well, parsing strings instead of having a well-defined api is fragile, so the easter eggs won't probably the only thing breaking the scripts.
by Fronzie 8y ago
Well, parsing strings instead of having a well-defined api is fragile, so the easter eggs won't probably the only thing breaking the scripts.
- 21 8y agoExcept that on Linux parsing strings and piping is the way of life.
- lima 8y agoPeople like to complain about the systemd ecosystems and I don't agree with some of their choices, but I appreciate their emphasis on D-Bus RPC instead of fragile text-based interfaces (even if it has issues on its own). This may or may not be an unpopular opinion, but I'm not particularly fond of all the string mangling going on in *NIX environments. It's great when the output format is well-defined - like many kernel interfaces - but please stop parsing "ifconfig" output!
- ben509 8y agoFortunately, if you pipe or redirect output, the filehandle won't be a terminal, so just check it with `isatty`[1]. [1]: https://linux.die.net/man/3/isatty https://linux.die.net/man/3/isatty