#!/bin/bash
# Ubuntu_Mate 18.04 LTS
seamonkey
sleep 1
killall seamonkey
I am trying to be able to shutdown a program after a set amount of time.
#!/bin/bash
# Ubuntu_Mate 18.04 LTS
seamonkey
sleep 1
killall seamonkey
I am trying to be able to shutdown a program after a set amount of time.
from three years ago…
Open and then close a program in bash Support & Help Requests
Thanks.
I found another method.
#!/bin/bash
#
# Use of timeout to kill program after specified time
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
timeout $1 seamonkey