Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash script perform root access check

#!/bin/bash
if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root" 
   exit 1
fi
Source by askubuntu.com #
 
PREVIOUS NEXT
Tagged: #bash #script #perform #root #access #check
ADD COMMENT
Topic
Name
9+3 =