String empty bash

Oct 30, 2012 · Linux shell/bash check if string is empty or not ... If / Else Statements (Shell/bash Scripting) Shell scripts use fairly standard syntax for if statements. The ... Jan 27, 2014 · It is true if the variable has a string set. This is a great way to test if a bash script was given arguments or not, as a bash scripts arguments are placed into variables $1, $2, $3 and so on automatically. Usually though in a bash script you want to check if the argument is empty rather than if it is not empty, to do this you can use the -z ... The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42) corresponding to the desired compatibility level. If BASH_COMPAT is unset or set to the empty string, the compatibility level is set to the default for the current version.