Notes to be included in the lesson
-Use set -x: stops the execution of a script if a command or pipeline has an error - which is the opposite of the default shell behaviour, which is to ignore errors in scripts
-Use set -e: prints out each command before executing it - extra useful for debug
Both options are great to include in the beginning of the file
-
Include #! /bin/bash in the beginning of the script to define the script interpreter
-
Include bash <scriptfile> as a means of running the script file (instead of going directly to ./<scriptfile>)
-
Include information on batch scripts
-
Check for flag in curl for not re-downloading the file every single time
-
Add the way to rename a screen; at creation screen -S <name>, after creation Ctrl+a, :sessionname <name>
-
Add commands to detach a screen without the shortcut: screen -d <ID>
-
Another way to terminate a screen without needing to reattach: screen -X -S [session # you want to kill] quit
Notes to be included in the lesson
-Use
set -x: stops the execution of a script if a command or pipeline has an error - which is the opposite of the default shell behaviour, which is to ignore errors in scripts-Use
set -e: prints out each command before executing it - extra useful for debugBoth options are great to include in the beginning of the file
Include
#! /bin/bashin the beginning of the script to define the script interpreterInclude
bash <scriptfile>as a means of running the script file (instead of going directly to./<scriptfile>)Include information on batch scripts
Check for flag in
curlfor not re-downloading the file every single timeAdd the way to rename a screen; at creation
screen -S <name>, after creationCtrl+a,:sessionname <name>Add commands to detach a screen without the shortcut:
screen -d <ID>Another way to terminate a screen without needing to reattach:
screen -X -S [session # you want to kill] quit