Use VAR if set, otherwise use VALUE
Use VAR if set, otherwise use VALUE and assign it to VAR
Use VAR if set, otherwise print VAR followed by MESSAGE. If MESSAGE isn't supplied then print paramter null or not set
Use VALUE if VAR is set, otherwise use nothing
Use VALUE if VAR is unset
Use VALUE if VAR is set
Use VALUE if VAR is unset and assign VALUE to VAR
Print MESSAGE to stderr and stop the script if VAR is unset
$mytest=${vara:-$vala}
$echo $mytest
$vala=12
$echo $mytest
$mytest=${vara:-$vala}
$echo $mytest
12
$vara=5
$mytest=${vara:-$vala}
$echo $mytest
5
$
$mytest=${vara:=$vala}
$echo $mytest
$echo $vara
$vala=12
$mytest=${vara:=$vala}
$echo $mytest
12
$echo $vara
12
$
$ unset vara
$ unset message
$ unset mytest
$ mytest=${vara:?$message}
ksh: vara: parameter null or not set
$ echo $mytest
$ echo $vara
$ echo $message
$ message='help me....'
$ mytest=${vara:?$message}
ksh: vara: help me....
$ echo $mytest
$ echo $vara
$ echo $message
help me....
$ vara=12
$ mytest=${vara:?$message}
$ echo $mytest
12
$ echo $vara
12
$ echo $message
help me....
$