Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to check bash runs with sudo

if [ "$EUID" -ne 0 ]
  then echo "Please run as root"
  exit
fi

#Note:
If you get 2: [: Illegal number: check if you have #!/bin/sh at the top
and change it to #!/bin/bash.
Comment

PREVIOUS NEXT
Code Example
Shell :: install requirements python 
Shell :: install mongodb mac m1 
Shell :: check running process in linux 
Shell :: restart rstudio 
Shell :: terraform import role assignment 
Shell :: show wifi password linux 
Shell :: git fetch prune 
Shell :: How to install SciPy on Anaconda 
Shell :: ubuntu mysql client cli 
Shell :: crontab do action inside folder 
Shell :: Katie Leung 
Shell :: current dir docker powershell 
Shell :: error timed out while waiting for handshake digitalocean 
Shell :: How to check git config username? 
Shell :: angular cli install ubuntu 
Shell :: how to change time on kali linux 
Shell :: how to upgrade snap packages 
Shell :: how understand what files we commited in git 
Shell :: ubuntu install jq 
Shell :: git remove .ds_store from commit 
Shell :: git pull origin master 
Shell :: stripe installation 
Shell :: improve ubuntu 16.04 performance 
Shell :: nginx cors only one is allowed 
Shell :: start apache server kali 
Shell :: loading json in js 
Shell :: isntall jest cli 
Shell :: sed remove line containing 
Shell :: uninstall gitkraken in ubuntu 
Shell :: git commit -m author identity unknown 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =