Part VII. scripting

Table of Contents

23. scripting introduction
prerequisites
hello world
she-bang
comment
variables
sourcing a script
troubleshooting a script
prevent setuid root spoofing
practice: introduction to scripting
solution: introduction to scripting
24. scripting loops
test [ ]
if then else
if then elif
for loop
while loop
until loop
practice: scripting tests and loops
solution: scripting tests and loops
25. scripting parameters
script parameters
shift through parameters
runtime input
sourcing a config file
get script options with getopts
get shell options with shopt
practice: parameters and options
solution: parameters and options
26. more scripting
eval
(( ))
let
case
shell functions
practice : more scripting
solution : more scripting