I have written the following shell script
while :; do
status=$($EMR_BIN/elastic-mapreduce --jobflow $JOBFLOW --list | grep "CopyLogs" | awk '{print $1}')
[[ $status == +( *RUNNING*|*PENDING*|*WAITING* ) ]] || break
sleep 60
done
Its giving me an error in line 3 saying syntax error in conditional expression: unexpected token
('' . I tried giving whitespaces between my braces, but its not working.
Can anyone help me out.