[ale] [EXTERNAL] Re: Bash Scripts: When to break them into files

Allen Beddingfield allen at ua.edu
Tue Apr 27 10:52:02 EDT 2021

I can't imagine the level of horror you would experience if you looked at some of the scripts I have out there.

Allen B.

Allen Beddingfield
Systems Engineer
Office of Information Technology
The University of Alabama
Office 205-348-2251
allen at ua.edu

From: Ale <ale-bounces at ale.org> on behalf of DJ-Pfulio via Ale <ale at ale.org>
Sent: Tuesday, April 27, 2021 9:38 AM
To: David Jackson via Ale
Cc: DJ-Pfulio
Subject: [EXTERNAL] Re: [ale] Bash Scripts: When to break them into files

Any bash script over 1 page needs to be written in an easier to read language.

Any function/method over 1 page needs to be split up into multiple functions. Since my bash scripts aren't usually allowed to be more than 1 page, that means some other language is used.

Even a script that is just doing error checking for 1 real command can be 60 lines long. I have a few like that. I ignore the 1-page rule, as long as the functionality fits into 1-page.  Header comments, variable setup can be multiple pages.
Ale mailing list
Ale at ale.org

More information about the Ale mailing list