weird error

Igor Gueths igueths at lava-net.com
Wed May 19 13:26:41 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all. I am attempting to debug this script so that I can lose this strange error that I get. Whenever I run it with no arguments to see if my error handler is working properly, I get: 
/usr/local/bin/chronix: line 4: : command not found

However if I pass the correct arguments to the script it works just fine. What I am curious about is why Bash is complaining about the : and nothing else. The script currently goes like this:
#!/bin/bash
# You can use any mp3 player you want, a special command line is provided for zinf users.
url="http://64.236.34.97:80/stream/1039"
"$1" $url
zinfcommandline="zinf -ui ncurses"
if [ "$1" == "zinf" ]; then
$zinfcommandline http://64.236.34.97:80/stream/1039
fi
if [ -z $1 ]; then
echo "Usage: Chronix <mp3 player to use>, for example mplayer."
exit 1
fi
done

Did I perhaps forget to escape something that I should have? Thanks!
- -- 
Failure is not an option, it comes bundled with your Microsoft product.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAq5jRNohoaf1zXJMRAjs+AKCtIV25BO7FI4aJKnkn9c1jRj8pfgCfTBJq
Ec964t/YbPIJ2OFSOti9cOw=
=4/Za
-----END PGP SIGNATURE-----




More information about the Speakup mailing list