#!/bin/sh set -e -u IN_SEQ='' HTTP='--use-http' CURSES='--curses' SLEEP_SEC=10000 usage() { [ $# -gt 0 ] && echo "ERROR: $1" echo "usage: $0 --in-sequence|--at-once [--no-use-http] [--gtk]" cat </dev/null 2>>$LOG & PID=$! echo "launched $PID" if [ $IN_SEQ -eq 1 ]; then sleep 9 kill $PID sleep 1 elif [ $IN_SEQ -eq 0 ]; then PIDS="$PIDS $PID" fi done done [ -n "${PIDS}" ] && sleep $SLEEP_SEC for PID in $PIDS; do kill $PID done