VARIABLE=value | Examples: |
PRINTER=printer-1232 | |
PATH=$PATH:/usr/sbin |
There are some special variables that are reserved (such as PATH) and you can read more
about these in the man page for sh. Otherwise, you can create a variable that is named
anything you choose.
Capturing output from a command into a variable can be very useful. You do this placing a command
in single-forward quotation marks: `command`. Example:
DATE=`date`
Then you can act on this variable just as if it were any other text or data in your script:
echo The date and time is currently: $DATE