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 mkdir -p for recursive subdirectory creationbash: for - looping to repeat commandsOSX review login items via bash+applescriptBASH - faster navigationbash - df to get space usage by volumebash - pass arguments with flags to scriptBash Substring Matching within Stringbash - du to get space used by directoryBitBar - OSX custom menu bar - running #!/bin/bash