====== 26 pgrepで2重起動防止 ====== function IsRunning() { if [ $$ -ne $(pgrep -fo "$0") ]; then echo "起動済みです。" exit 1 fi } {{tag>bash}}