Merge remote-tracking branch 'origin/master'

# Conflicts:
#	.gitignore
master
Rinsvent 2 years ago
commit c43c16eb8d
  1. 11
      src/condition.sh
  2. 24
      src/condition.test.sh

@ -0,0 +1,11 @@
#!/bin/bash
equal() {
local RETURN
RETURN=0
if [[ "$1" = "$2" ]];
then
RETURN=1
fi
echo $RETURN
}

@ -0,0 +1,24 @@
#!/bin/bash
. ./condition.sh
# equal
if [ $(equal 1 1) -eq 1 ]
then
echo "equal numeric"
fi
if [[ $(equal 1 2) -eq 0 ]]
then
echo "not equal numeric"
fi
if [[ $(equal "asdf" "asdf") -eq 1 ]]
then
echo "equal string"
fi
if [[ $(equal "asdf" "asdf1") -eq 0 ]]
then
echo "not equal string"
fi
Loading…
Cancel
Save