📜  根检查 bash 脚本 - Shell-Bash 代码示例

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

代码示例1
#!/usr/bin/env bash
if [[ "$(id -u)" -ne 0 ]]; then
  # Code
  echo "Please, Check Root "
  exit 1
fi
function main() {
        echo "Complete!"
        exit 1
}
main