Shell Script: if then else in one line








if [[ ${a} -ge 0 ]]; then echo "positive number"; else echo "negative number"; fi



my_func
if [[ $? -ne 0 ]]; then echo "failure"; else echo "success"; fi



No comments:

Post a Comment