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 & errorssqlite3 access via bashbash - awk if then else snippetOSX Bash - commands I didn't know before (or saw…BASH snippet - clean up stereo pairs and sort by…BASH y/n select - on user inputbash: for - looping to repeat commandsbash: for - looping over and processing files in…OS-X - file system check - fsck in Single User…