miscellaneous bash notes and snippets
set -x
allows for line by line output
example
set -x
echo Hi
echo Hello World
output
+ echo Hi
Hi
+ echo Hello World
Hello World
exists script on a failure either internally or from a pipeline, good as a safety
backticks `` around a variable declaration will execute it as a command
name=`uname`
echo `$name
# output is result of uname command ex: "Linux"