< Day Day Up > |
When a command is enclosed in backquotes, it will be executed and its output returned. This process is called command substitution . It is used when assigning the output of a command to a variable or when substituting the output of a command within a string. All three shells use backquotes to perform command substitution. [2]
Example 7.34.1 $ name=`nawk F: '{print }' database` $ echo $name Ebenezer Scrooge 2 $ set `date` 3 $ echo $* Fri Oct 22 09:35:21 PDT 2004 4 $ echo Oct 2004 EXPLANATION
|
< Day Day Up > |