Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash if set variable

if [ -z "$var" ]; then echo "var is blank"; else echo "var is set to '$var'"; fi
Comment

bash if set variable

if [ -z ${var+x} ]; then echo "var is unset"; else echo "var is set to '$var'"; fi
Comment

PREVIOUS NEXT
Code Example
Shell :: docker pull image 
Shell :: update composer mac 
Shell :: how to open sublime in linux 
Shell :: LINUX TEST FOLDER EXITS 
Shell :: wsl directory 
Shell :: pipenv specify environment location 
Shell :: install vscode ubuntu 
Shell :: git bash posh git 
Shell :: centos 7 openldap install 
Shell :: git lines added and removed by author 
Shell :: remove folder with content cmd 
Shell :: pip not installing packages 
Shell :: git cheat sheet 
Shell :: vtex cli install 
Shell :: react app deploy on github pages 
Shell :: how to uninstall slick-carousel 
Shell :: lock symbol on files in ubuntu 
Shell :: conda command to install folium 
Shell :: docker install python 
Shell :: brew install node sass 
Shell :: git push and pull not asking password 
Shell :: jenkins store sh output in variable 
Shell :: genymotion install ubuntu 
Shell :: linux script to clean up log files in /var/log 
Shell :: how to remove large file from github repo history 
Shell :: ssh key gen 
Shell :: git rm --cached 
Shell :: scan and print all keys redis shell 
Shell :: how to install portainer on raspberry pi 
Shell :: flush the port 3001 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =