3 ms·
Of course everyone does what works for them. But I have to say that I think the 45 lines rule is not the best criterion. Lots of scripts which are of the form
by mturmon 15y ago
Of course everyone does what works for them.
But I have to say that I think the 45 lines rule is not the best criterion. Lots of scripts which are of the form "move these files around, run this command on the files, mangle the output, send it to this command to summarize, send to another command to pretty-print" can be long in line count, but are really well-done in shell. Basically, operation sequencing, and/or line-by-line file processing.
Shell makes it easy to ensure tempfiles are deleted, to catch signals, to automatically check error status of each and every command.
As you note, sometimes shell is "contraindicated" (as they say in medicine). Anything needing data structures, or abstraction beyond simple functions, is not so good for shell.