4 ms·
Not necessarily. Shell scripts often embody the unix “do one thing and do it right” principle. To download a file in a bash script you wouldn’t (sanely) source
by ComputerGuru 2y ago
Not necessarily. Shell scripts often embody the unix “do one thing and do it right” principle. To download a file in a bash script you wouldn’t (sanely) source a bash script that implements an http client;, you would just shell out to curl or wget. Same for parsing a json file/response: you would just depend on and defer to jq. Whereas in python you could do the same but most likely/idiomatically would pull in the imports to do that in python.
It’s what makes shell scripts so fast and easy for a lot of tasks.
- robertlagrant 2y agoFair enough, although in your examples Python comes with JSON support, but not a (very usable) HTTP client, and Bash has the reverse problem. I would like it if Python just had a sane nice HTTP client built in, but it can also just shell out to curl.