added table 5.3 which briefly demonstrates how variables can be set in the shell
This commit is contained in:
parent
12616564c6
commit
436ec971a5
1 changed files with 12 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
--------------------- Table 5.3 ---------------------
|
||||
|
||||
$var value of var; nothing if var is undefined
|
||||
${var} same; useful if alphanumerics follows variable name
|
||||
${var-thing} value of var if defined; otherwise thing.
|
||||
$var unchanged.
|
||||
${var=thing} value of var if defined; otherwise thing.
|
||||
If undefined, $var set to thing
|
||||
${var?message} if defined, $var. Otherwise print message
|
||||
and exit shell. if Message empty, print:
|
||||
var: parameter not set
|
||||
${var+thing} thing if $var defined, otherwise nothing
|
||||
Loading…
Add table
Add a link
Reference in a new issue