2 ms·
The cryptic nature of Bash syntax is why I generally try to do all my scripting in Python these days, if it exceeds a certain level of complexity. i.e. if I wan
by atribecalledqst 5y ago
The cryptic nature of Bash syntax is why I generally try to do all my scripting in Python these days, if it exceeds a certain level of complexity. i.e. if I want to just group a bunch of shell commands together with no special logic, Bash is usually OK. For anything more complicated than an if statement or while loop I have to refer back to old scripts to remember the syntax. Not an ideal situation.
I did recently have a case where I needed to run a shell command with a multi-line output, and an easy call to os.popen() wasn't returning the full output. So, back to Bash arrays and weird text parsing syntax (IFS=" " read tempArray...) I went...