4 ms·
If a "properly made" Python or Ruby script uses more advanced parsers, what prevents you from "properly making" a shell script?
by nilved 11y ago
If a "properly made" Python or Ruby script uses more advanced parsers, what prevents you from "properly making" a shell script?
- nailer 11y agoA few things: - Most people who write shell scripts really don't want to write a 'ps' or 'ip' (or for non-Linux, 'ifconfig') replacement. On the other hand, Python and Ruby have libraries that talk to /proc and the network ioctls directly. - most shell script authors don't even use bash arrays, and higher level data types don't exist. It's hard to represent a C struct in shell. C libraries are therefore exposed to shell scripts by scraping their stdout.