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 NULL DEVICE - redirecting output & errorsbash: for - looping over and processing files in…bash - wavecache.wfm removalbash - pass arguments with flags to scriptbash OSX: hours on a computer, list rebootsOSX review login items via bash+applescriptbash OSX iTerm2 - display inline images in terminalBitBar - OSX custom menu bar - running #!/bin/bashBash Substring Matching within String