If you want to check for a empty bash variable you can do this like given here:
# if VAR is emptyif["x$VAR" == "x"];then
...
fi
When $VAR is empty the Statement in the if-clause is true
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
bashscr/check_empty_var.txt · Last modified: 23.03.2013 17:25 by eanderalx