3 ms·
> My rule of thumb used to be if I have more than one "if" in a shell script then its going to python... But now its any ifs or variables Hmm. I have a slight
by earenndil 8y ago
> My rule of thumb used to be if I have more than one "if" in a shell script then its going to python... But now its any ifs or variables
Hmm. I have a slightly different view. If logic is complex, then it should be moved to a different language. But if there are a lot of flat if statements then shell is fine.
- dmitryminkovsky 8y agoYeah it’s almost inevitable for a bash script to have lots of ifs but they’re almost always simple, checking some variable is empty or something.