3 ms·
Shell scripts are normally based on scraping the output of other commands via regexs. Properly made Python or Ruby scripts are not.
by nailer 11y ago
Shell scripts are normally based on scraping the output of other commands via regexs. Properly made Python or Ruby scripts are not.
- nilved 11y agoIf 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.