add system

Check if it's root running
This commit is contained in:
I-Man Ng 2019-02-21 17:08:23 +08:00 committed by GitHub
parent ae9cbf57ef
commit fb39f8b017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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