![脚本帮助在设定的时间后关闭程序](https://linux22.com/image/1158857/%E8%84%9A%E6%9C%AC%E5%B8%AE%E5%8A%A9%E5%9C%A8%E8%AE%BE%E5%AE%9A%E7%9A%84%E6%97%B6%E9%97%B4%E5%90%8E%E5%85%B3%E9%97%AD%E7%A8%8B%E5%BA%8F.png)
这不太正常。
#!/bin/bash
[ ! $1 ] && { echo -e "Error!! No time given.!!"; exit 1; }
seamonkey
sleep $1
killall seamonkey
2018 年 7 月 20 日
#!/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