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 combine pdf or other image files into pdfbash NULL DEVICE - redirecting output & errorssqlite3 access via bashenable / disable root user - OSXBash Substring Matching within Stringbash - awk with colored outputOSX Bash - commands I didn't know before (or saw…OSX review login items via bash+applescriptBitBar - OSX custom menu bar - running #!/bin/bash