Bash How to do conditional execution in Bash In Bash scripts, any command following a && will only execute if the previous conditional or command succeeded (returned 0)
Bash How to check if a string is empty in Bash To check if a string is empty in a Bash script, use the -z conditional which returns 0 (true) if the length of the string is 0 and 1 (false) if it is greater than 0. myVar="hello" if [[ -z "$myVar" ]]; then echo "myVar is empty" else echo "myVar is