I have found this in an old script but can't tell what is the use of the "x" infront of the ${VARIABLE} and infront of the value "onx" being compared
VARIABLE="${VARIABLE:-"on"}"
if [ "${VARIABLE}x" != "onx" ]
Are there any effects if the x is removed?
bash, there will be no difference to the outcome of the test ifxis removed. See the dupe questions.VARIABLEto a value if it's either unset or empty. Since nowVARIABLEcannot be empty thexguard isn't required