0

This is not quite working right.

#!/bin/bash
[ ! $1 ] && { echo -e "Error!! No time given.!!"; exit 1; }
seamonkey
sleep $1
killall seamonkey

7/20/18

#!/bin/bash
#
# Originally by pavlos_kairis
#
# Open Seamonkey for a specified amount of time and then terminate program
if [ $# -eq 0 ]; then
  echo "Error! no time given."
  echo "Syntax:"
  echo 
  echo "15s = 15 seconds"
  echo "1m = 1 minute"
  echo "1h = 1 hr"
  exit 1
fi
echo "Opening Seamonkey ..."
seamonkey  &
sleep $1
echo "Seamonkey will close in " $1
killall seamonkey
David Foerster
  • 36,890
  • 56
  • 97
  • 151
fixit7
  • 3,399

0 Answers0