Search Results

Search: Posts Made By: ysrini
6,194
Posted By ysrini
I resolved this by using ':-' after the variable...
I resolved this by using ':-' after the variable name
if [ -z "${VAR_1:-}" ]
then
echo "is empty"
fi
echo "done"This causes the shell not to exit if the variable is not set or null
...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 09:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy