All languages

Shell

You're viewing a free preview. Sign in free to read every script.

Why this exists Automation is repetition: every server, every file, every line of a list. Bash has the loops for it, plus arrays to hold lists and functions to avoid copy pasting. A few habits (quoting array expansions,…

Shell Basics: Loops, Arrays and Functions

for, while and until loops, reading a file line by line safely, Bash arrays and associative arrays, and functions with local variables. Includes why you should never loop over the output of ls.

Sign in free to read this script, along with the rest of the library.

Sign in free