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 - du to get space used by directoryBitBar - OSX custom menu bar - running #!/bin/bashbash - df to get space usage by volumeOS-X - file system check - fsck in Single User…bash: for - looping to repeat commandsenable / disable root user - OSX.DS_Store - BASH shell - Linux/OSX = Find & Remove Filesbash combine pdf or other image files into pdfbash - pass arguments with flags to script