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: process each line as result of command using IFS=bash - awk with colored outputBASH snippet - clean up stereo pairs and sort by…BitBar - OSX custom menu bar - running #!/bin/bashbash OSX: hours on a computer, list rebootssqlite3 access via bashThunderbird - control mail check intervalbash - awk if then else snippetbash - df to get space usage by volume