2 ms·
It's not a matter of comfort or discomfort with a tool; A long time ago I wrote: a web server in shell (using either inetd or tcp_server) in 1996, and wrote a m
by cduzz 3y ago
It's not a matter of comfort or discomfort with a tool; A long time ago I wrote: a web server in shell (using either inetd or tcp_server) in 1996, and wrote a mail user agent / web server to read mail out of a maildir and display it as html (that one had both a y2k bug and a "time_t is 11 digits now?" bug); that one only used tcp_server... I also wrote a web server (in shell) to manage a wireless captive portal. Some of this was on solaris, some on ultrix, some on freebsd....
I'm proud of you for making a ton of money on bash using CGI; "it's not dumb if it works" but ... doing complex stuff like this in shell is ... dumb.
At least, I certainly know better. You do you, though.
- mike_d 3y ago> "it's not dumb if it works" It's not dumb if you know what you are doing. I and others have pointed out how to properly handle binary data in shell scripts. This might be a good start if you'd like to learn more: https://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html https://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
- cduzz 3y agoI'm simply pointing out that a "pure bash" or other shell program is folly once you get past a trivial level of complexity. That How-to doesn't mention that shell eats nulls. If you're using shell as glue, that doesn't matter, but if you're using shell to process (not pass to another program) raw tcp connections, you'll need to manage binary data, which is full of nulls. Perhaps you're not even aware of these issues? Anyhow, go on about your life grand troll, you're the winner.