if [[ $EUID -eq 0 ]]; then
echo "You are running this script as root"
read -r -p "Are you sure? [y/N] " response
case "$response" in
[yY])
#do_something $@
;;
*)
#exit_script
;;
esac
fi
Last active
December 21, 2019 10:37
-
-
Save rohan-molloy/b304653d2be767d5ed3fbd83deb86c8f to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment