HOME

Bash

Structure of a bash script
#!/bin/bash

function my_func() 
{
  echo "Hello World"
}

my_func

exit 0

Compare result with a number
result="8.2"
if [ $result > 8 ] ; then
    echo "Result is greater than 8."
else
    echo "Result is not greater than 8."
fi