I'm new to bash, and need some simple script. It runs jar, and has to find "RESPONSE CODE:XXX". I need this response code (just XXX). I've try this:
URL=$1
echo $URL
callResult=`java -jar RESTCaller.jar $URL`
status=$?
if [ $status -eq 0 ]; then
result=`$callResult >> grep 'RESPONSE CODE' | cut -d':' -f 2`
else
echo error
fi
I get ./run.sh: line 7: RESPONSE: command not found
What am I doing wrong?