#!/bin/sh NEWWIN="" OPT="" URL="" for i in $@; do case $i in --newwin) NEWWIN=1 ;; -*) OPT="$OPT $i" ;; *) URL=$i;; esac done if [ -z $NEWWIN ] ; then for P in mozilla-bin netscape; do PID=$(/sbin/pidof $P | head -1) if [ -n "$PID" ] ; then [ $P = "mozilla-bin" ] && PROG=mozilla || PROG=$P [ -n "$URL" ] && $PROG -raise -remote "openURL($URL)" exit fi done fi for P in mozilla netscape; do if which $P &> /dev/null ; then $P "$URL" & exit fi done