4 ms·
That could be, but I've also noticed a sort of purism where the shell script is ideal because it can be run on any system. (Of course, using bash for the shel
by gerikson 7y ago
That could be, but I've also noticed a sort of purism where the shell script is ideal because it can be run on any system.
(Of course, using bash for the shell isn't a good choice because you can't rely on bash being installed).
Personally I reach for Perl as soon as any sort of arithmetic is involved. And even if starting with find(1) is the first choice, it's worth getting to know modules like File::Find because they're way more powerful.
- shagie 7y agoIt is unfortunate that those sysadmins are then failing to just go full on awk then rather than those shell scripts. Even alpine has awk installed. docker run --rm alpine awk
- boring_twenties 7y agoalpine doesn't "have awk installed," it's just that BusyBox that has an awk implementation. For real GNU awk you have to install the gawk package.