I am writing a script where I am using the combination of logical 'OR' and logical 'AND' statement. This is the script:
#!/bin/bash
echo "Enter the value of a"
read $a
echo "Enter the value of b"
read $b
if
[[ $a != STARTED && $b == STARTED ] || [ $b != STARTED && $a == STARTED ]]; then
echo "Either of the JVMs is not yet up, so lets wait for some more time"
i=$(($i+1))
sleep 1s
fi
and getting the following error while executing it:
line 13: syntax error in conditional expression
line 13: syntax error near `]'
line 13: `[[ $a != STARTED && $b == STARTED ] || [ $b != STARTED && $a == STARTED ]]; then'
I am using bash shell. Any help on this is really appreciated.