I created this bash script based on answers I found here:
If [[ $(autorep -J jobname | cut -c108-110 | sed -n '/ST/!'p | sed '/^$/d' | sed -n '/_/!'p) == *ST* ]]; then
echo "Status is Started"
fi
error:
./stj.sh: line 1: syntax error near unexpected token `then'
- The command inside the
()
works if I cut and paste in the terminal, but I get an error when I execute with theif
command.