TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
odd bash script problem
I'm new to bash and I'm trying to write a little script to load a new
window of netscape if I type newnetscape usr new and a act normal
otherwise here is the script:
#!/bin/sh
if [ $2 = "new" ]
then
netscape -remote "openURL ($1, new-window)"&
fi
netscape -remote "openURL ($1)"&
It works except when I don't have new as $2, I get the following message
[lueyb@pcLueyB /]$ newnetscape http://www.linuxnow.com
/usr/local/bin/newnetscape: [: =: unary operator expected
What's wrong?
Thanks,
Ben
Ben Luey
lueyb@carleton.edu