>>105743654 (OP)
They have two different use cases.
Neither are good at the other's; You can do both with either, but at the cost of efficiency on either end.
>>105743680
yes, i also want to kys when using python >>105743936
i would say that neither is good at its job, but bash at least doesn t act like a kumbaya faggot and isn t held at the same level as real programming languages
>>105743654 (OP)
I prefer pic related, too bad you need Maven shitware to download dependencies, though is good enough as a no dependencies Bash+ language.
>>105745953
You wouldn't write it like this in both languages.
python
for _ in range(3):
print("something")
bash
for _ in $(seq 3); do echo "something"; done
If I need to call programs installed on the system (like with seq in the example above), then I usually use bash. If I need data structures, e.g. a hash map, then I use Python.
>bash
do you use word 'bash' to describe shell scripts in general? do you mean the fairly recent bash version that comes with your loonix or the very outdated and different 2007 one that comes with tim apple? do you test on both to ensure portability? do you rely on features of exclusive to coreutils or busybox or something else? are your scripts posix compatible? do you know what unavoidable non-posix behaviors modern shell builtins have (e.g. 'echo' having opts)? do you know if and why your sed or grep calls don't work on some systems? do your scripts rely on commands that only linux or bash ships (e.g. disown or pidof)?
>>105747054
also - do you know about various different regex variants that shell itself and the distributions of sed, grep, awk implement? do you know which ones are portable?
>>105746939 >can I ask why, as someone who does not
When I learned shell scripting, I thought it's a good idea to write portable shell scripts without any "bash-isms", so you could even use them on a system where only plain old sh is available. But for personal scripts this is pointless, so I should probably look into what bash has to offer.
>>105747088 >But for personal scripts this is pointless
until you got to figure out anyway why your personal script doesn't run on macos (ooold bash) from the work or 'in docker' (ash sh on distros like alpine)
>>105743654 (OP)
one is useful for everything so long as you don't care it's 60x slower than a real programming language like C or Fortran
one is useful for scratching the autistic 'use the right tool for the job' minimalist urges