mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-26 06:17:01 +00:00
add system
Check if it's root running
This commit is contained in:
parent
ae9cbf57ef
commit
fb39f8b017
@ -1261,6 +1261,12 @@ xcowsay
|
|||||||
## System
|
## System
|
||||||
[[back to top](#handy-bash-oneliner-commands)]
|
[[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
|
##### Snapshot of the current processes
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
Reference in New Issue
Block a user