Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

root check bash script

#!/usr/bin/env bash
if [[ "$(id -u)" -ne 0 ]]; then
  # Code
  echo "Please, Check Root "
  exit 1
fi
function main() {
        echo "Complete!"
        exit 1
}
main
Comment

PREVIOUS NEXT
Code Example
Shell :: how to install firefos on an rpi 
Shell :: kill all processes by name linux 
Shell :: rancher docker reset password 
Shell :: nginx by brew 
Shell :: node-gyp 
Shell :: amend last commit message 
Shell :: conda install cufflinks 
Shell :: close port 
Shell :: linux give full permission to directory 
Shell :: yarn install chocolatey 
Shell :: edit sshd_config 
Shell :: install firebase in react 
Shell :: how to list all gnome extensions 
Shell :: chnage nvm default version 
Shell :: installing saas in react application 
Shell :: install vercel npm 
Shell :: bash copy directory 
Shell :: Ports are not available: listen tcp 0.0.0.0/50070: bind: An attempt was made to access a socket in a way forbidden by its access permissions 
Shell :: install kazam ubuntu 18.04 
Shell :: delete all container and images docker 
Shell :: git set remote 
Shell :: turn off selinux centos 
Shell :: how to install tar.gz in ubuntu 
Shell :: Waiting for your editor to close the file... 
Shell :: drush pm-list of enabled modules 
Shell :: check if variable contains string bash 
Shell :: git push command line 
Shell :: linux filter environment variable results 
Shell :: moodle purge cache from command line 
Shell :: homebrew install in ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =