1.5.2.
Structure
Up one level
-
The structure of a shell script is very flexible. Even though in Bash a lot of freedom is granted, you must ensure correct logic, flow control and efficiency so that users executing the script can do so easily and correctly.
When starting on a new script, ask yourself the following questions:
-
Will I be needing any information from the user or from the user's environment?
-
How will I store that information?
-
Are there any files that need to be created? Where and with which permissions and ownerships?
-
What commands will I use? When using the script on different systems, do all these systems have these commands in the required versions?
-
Does the user need any notifications? When and why?

