Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash negate if

if [[ $? -ne 0 ]]; then       # -ne: not equal

if ! [[ $? -eq 0 ]]; then     # -eq: equal

if [[ ! $? -eq 0 ]]; then
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bash #negate
ADD COMMENT
Topic
Name
8+9 =