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:OS-X - file system check - fsck in Single User…bash - awk if then else snippetbash - using functionsBASH snippet - clean up stereo pairs and sort by…bash OSX iTerm2 - display inline images in terminalbash - wavecache.wfm removalbash: process each line as result of command using IFS=bash OSX: hours on a computer, list rebootsbash - iterating over a string array