> On 21 Dec 2022, at 17:06, Chris Angelico <ros...@gmail.com> wrote: > > On Thu, 22 Dec 2022 at 03:58, gene heskett <ghesk...@shentel.net> wrote: >> >>> On 12/21/22 11:22, Chris Angelico wrote: >>> On Thu, 22 Dec 2022 at 03:11, Stefan Ram <r...@zedat.fu-berlin.de> wrote: >>>> >>>> Lars Liedtke <l...@solute.de> writes: >>>>> Or you could have "native" bash ($SHELL) with WSL. >>>> >>>> In this newsgroup, it would actually be obvious to use Python. >>> >>> Less obvious than you might think - partly because bash is just so >>> dang good that it's really really hard to outdo it :) Sure, bash has a >>> lot of weird and wonky edge cases, but it's an incredibly practical >>> shell to use. >>> >> When you make a statement like that, Chris, you should also note that >> every single one of those "wonky edge cases" is documented down to the >> last dotted i. Bash's docs will kill a good sized pulp tree, needing >> around a ream of paper to print on a duplex printer. I know, I did it >> around a decade ago. If you like to write scripts, having a dead tree >> copy of the docs at your elbow in incredibly useful. That huge man page >> does not cover it like the printed docs do. >> > > Oh yes, absolutely true. Its wonkiness is dependable and consistent; > but it is definitely quirky (look at all the different ways to embed > arguments into things, and the ways that $*, $@, "$*, and "$@" behave > when put into variables). Not usually a problem, but it does sometimes > leave you thinking "wow, wouldn't it be easier to just use something > like Python?". And in the complicated cases, yeah, it can be. But in > the simple cases? Bash rocks.
I see bash scripts that are 1000’s of line of code at work and its a maintenance nightmare. Knowing when to make the move from “handy bash script” to “this is a production application” and needs to be python is what I see people miss. After a certain point in complexity the python code wins on maintenance. Personally i set a low bar to move from bash to python. Barry > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list