What is the difference between a globally scoped variable and a locally scoped one?
Locally scoped variables are only valid within a function, globally scoped variables can be used throughout the entire script (even in functions).
How can we set values and attributes on variables?
By using the declare command.
How can a function use arguments passed to it?
In the same way as a script can: by using $1, $#, $@, and so on.
How can we return a value from a function? By outputting it to stdout. The command that calls the function should know to capture ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.