#!/bin/bash # Launches uzbl and cleans up afterwards (if req'd) # Set path to uzbl UZBL="uzbl" # Find it if not specified if [ -z "${UZBL}" ] || [ ! -x "${UZBL}" ]; then UZBL="$(which uzbl)" fi if [ ! -x "${UZBL}" ]; then echo "Unable to find uzbl" >&2 exit 1 fi # Start up uzbl uzbl & pid=$! # Wait for Uzbl to start up sleep 2 # Retrieve the fifo(s) name(s) fifos=$(lsof -p ${pid}|grep 'FIFO'|\ grep -v '\&2 rm "${fifo}" fi done exit ${ret}