Default value of variable in bash -


what default value of variable $y in bash scripting?

i want perform sum of n input numbers why needed this.

if

echo $y 

this show empty (null string) default value. however, set default bash variable, syntax is:

var=${1:-default}     

this sets var value of 1st arg script, if not available sets default


Comments

Popular posts from this blog

c - CUDA code not processing if block properly -

Android Capture Image From Camera -

Define custom list-style-type in CSS -