From fb39f8b017bc9a40c3ab59777277c0a2a3fae69f Mon Sep 17 00:00:00 2001 From: I-Man Ng Date: Thu, 21 Feb 2019 17:08:23 +0800 Subject: [PATCH] add system Check if it's root running --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 504018b..5006164 100644 --- a/README.md +++ b/README.md @@ -1261,6 +1261,12 @@ xcowsay ## System [[back to top](#handy-bash-oneliner-commands)] +# Check if it's root running +if [ "$EUID" -ne 0 ]; then + echo "Please run this as root" + exit 1 +fi + ##### Snapshot of the current processes ```bash