#!/bin/sh moz=firefox for url in "$@" ; do if ! $moz -remote "openurl($url,new-tab)" ; then $moz $url & sleep 5 fi done