Could you make sure you pandora.sh script has EXACTLY the following? I've tested this script on both 10.3 and 10.4 and it works.
pandora.sh
#!/bin/bash
port=$1
if [ ! $port ]; then
port=8085
fi
export TEMP=`echo ~`/Library/Caches/TemporaryItems
java -jar pandora.jar $port&
# make sure java has enough time to launch
sleep 5
osascript -e "tell application "Firefox"" -e "Get URL "http://localhost:$port"" -e "end tell"
Ahh. So if I have
#!/bin/bash
It gives that error. If I do
#!/bin/bash
I do not get the error. Only Difference is the space before #. But it still doesnt work. Just does nothing. I get no error, but it just sits there. I am using OS X 10.4.6 on a Macbook.
Check you line endings - Make sure you are using LF (unix) and not CRLF (windows)