3 ms·
> How many times do we search for "if statement bash" or "function bash" because the if and function syntax isn't modern and isn't easy to remember? The number
by saghm 8y ago
> How many times do we search for "if statement bash" or "function bash" because the if and function syntax isn't modern and isn't easy to remember?
The number of times I've used a for loop in shell is roughly equal to the number of times I've had to look up how to use a for loop in shell. Relatedly, I generally switch to Ruby when my scripts get complex enough to require control flow.
- boomlinde 8y agoFor some tasks I find myself writing my scripts in bash with a bunch of python herefiles. Bash is pretty straight forward when it comes to text stream processing and tool integration but for anything more the herefiles are a good way to avoid figuring out bash control flow and messing with list delimiters