過去の遺産ということで。
散乱してるけど。
# keep my playground secure
echo "############################################################";
echo "## ##";
echo "## If you do not know why Terminal has launched, answer ##";
echo "## 'n' to the following question. Otherwise, hit 'y' to ##";
echo "## open Terminal as usual... ##";
echo "## ##";
echo "############################################################";
echo "Open Terminal.app now (y/n)";
read -r -t 15 -e OpenTerminal
if [ "$OpenTerminal" == "" ] || [ "$OpenTerminal" == "n" ]; then
exit 1;
fi;
if [ "$OpenTerminal" != "y" ]; then
LastCommand="$OpenTerminal";
echo "Open Terminal.app now (y/n)";
read -r -t 15 -e OpenTerminal
if [ "$OpenTerminal" == "y" ];then
echo "This was the command that started Terminal.app:";
echo $LastCommand;
else
exit 1;
fi;
fi;