DS bash – check that script is being executed by root ~~ August 24, 2019 12345if [ $EUID -ne 0 ] then /bin/echo $'\nThis script must be run as the root user!\n' exit fi Related Posts:BASH - faster navigationOSX review login items via bash+applescriptbash - du to get space used by directorybash OSX iTerm2 - display inline images in terminalbash mkdir -p for recursive subdirectory creationbash - awk with colored outputenable / disable root user - OSXbash OSX: hours on a computer, list rebootsbash - pass arguments with flags to script