DEV Community

Discussion on: Bash from scratch: learn enough bash to write your own scripts

Collapse
 
shmdhussain12 profile image
Mohamed Hussain

Thanks Ahmed for this concsice article covers shell scripting essentials which will help in writingand understanding the bash file...my doubt is 1. Do we need to use only the uppercase for the variable?....2. what is the difference between the sh and bash ..what is default in Mac terminal....

Collapse
 
ahmedmusallam profile image
Ahmed Musallam • Edited

Hey, Glad you liked it!

  1. Using uppercase variable names is a naming convention you'll see in most scripts out there. You can chose a different convention :) nothing is stopping you :)
  2. sh stands for shell. bash is a shell. Read @maxwell_dev's post at the beginning of the article.
Collapse
 
moopet profile image
Ben Sinclair

Using uppercase is a convention for variables from the parent environment. Lowercase for variables that are local to our script.
I see people use uppercase all the time, but it's usually just because a lot of scripts don't need local variables and that's how they learnt.
I mean, it doesn't really matter... but I am the cheerleader for Team Lowercase.