I am running bash in Ipython notebook. I have a variable called run_state that presently is RUNNING. However when I try to compare its value to this string, it doesn't match. What am I doing wrong? The image shows the output of the first echo and that indeed run_state equals RUNNING
run_state="RUNNING"
gcloud ai-platform jobs describe $1 >describe
grep -m 1 -o 'state: [a-zA-Z]*' describe | sed s/'state: '// >state
state_var=$(<state)
echo $state_var
if [ ["$state_var" == "$run_state"] ];
then
echo $state_var
fi