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
Post a Comment