📜  bash 切换脚本 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:29.296000             🧑  作者: Mango

代码示例1
#!/bin/sh
# This shell script is PUBLIC DOMAIN. You may do whatever you want with it.

TOGGLE=$HOME/.toggle

if [ ! -e $TOGGLE ]; then
    touch $TOGGLE
    command1
else
    rm $TOGGLE
    command2
fi