Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

if statement in shell script

  if [ "$result" == "1" ]
    then 
      echo "test" >> /home/samurai/test.txt
    fi
    

    
    if [[ "$result" -eq "1" ]]
    then 
      echo "test" >> /home/samurai/test.txt
    fi
    
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #statement #shell #script
ADD COMMENT
Topic
Name
6+1 =