On 08:49 12 May 2002, Joel Hammer <[EMAIL PROTECTED]> wrote:
| I use xclick, but not just with mutt. I have a netscape icon on my control
| panel with the following executable property:
| 
| /usr/local/bin/DisplayHTML
| 
| The program DisplayHTML is as follows:
| 
| #!/bin/bash
| a=`ps ax | grep mozilla | grep -v grep`
| [ -n "$a" ] && {
|             netscape '-remote "openURL($1)"'
|      }
| [ -z "$a" ] && {
|             netscape "$1"
|                 }     
| 
| The ps stuff is to see if a version of netscape is already
| running, and if so, don't start a new netscape session.
| Depending on your browser, you may have to modify this script. 

Indeed - for one thing it's guess wrong on multiuser machines.
Also, wouldn't an if be more succint:

        if [ -n "$a" ]
        then  netscape '-remote "openURL($1)"'
        else  netscape "$1"
        fi

? And surely this doesn't work. The quoting's wrong. This:

        netscape '-remote "openURL($1)"'

should really be this:

        netscape -remote "openURL($1)"

Oh, I get it - you're surviving because on RedHat, the "netscape" command is
itself a script which grossly buggers the quoting, undoing your misquoting.
Scarey :-)
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

What's a pencil? Is that like a PDA stylus?
        - [EMAIL PROTECTED] (Elizabeth Schwartz)

Reply via email to