diff options
| author | F3RR3T <github@st33v.com> | 2014-09-06 22:04:16 +1000 |
|---|---|---|
| committer | F3RR3T <github@st33v.com> | 2014-09-06 22:04:16 +1000 |
| commit | e779a2afe559d67bef12bb57f1a4ce0de06b9c81 (patch) | |
| tree | e75ae52ce5eb8019227ae5ab2b9d20c81fbb44bf /test.sh | |
| parent | e90ead311dff1bccd50cbea8e2e915c185537e53 (diff) | |
Monitor now ckecks for IP change and invokes email notification
Diffstat (limited to 'test.sh')
| -rwxr-xr-x | test.sh | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +#! /bin/bash + +# SJP 5 September 2014 +# just testing how to set if conditions + +x=$1 + +echo 'square bracket' +#[ $x == 1 ] && echo 'x = 1' || echo 'x is not 1' +[ $x == 1 ] && ("$x"=2; echo 'adding 1') || echo 'x is not 1' + +echo "x is now $x" + +#wrong +# [ $y ] && echo "y is true" || echo "y is false" +#echo -e "y is $y\n" + +#y=F + +#[ $y ] && echo "y is true" || echo "y is false" +#echo "y is $y" + +echo -e "\n multi line if then test" + +if (test "$x" -lt $2) then + echo "$x is less than $2" +else + echo "$x is not less than $2" +fi + |
