Difference between revisions of "Bash operators"

From Linuxintro
imported>ThorstenStaerk
(New page: = $() = The operator $() in the bash shell is replaced by the output of the command enclosed in the parentheses. Examples: rpm -ql $(rpm -qa) for i in $(seq 1 1 100); do echo $i; done)
 
imported>ThorstenStaerk
Line 1: Line 1:
 
= $() =
 
= $() =
The operator $() in the bash shell is replaced by the output of the command enclosed in the parentheses.
+
The operator $() in the bash shell is replaced by the output of the command enclosed in the parentheses. It is equivalent to backticks (``), but can be cascaded more easily.
  
 
Examples:
 
Examples:

Revision as of 13:56, 30 March 2009

$()

The operator $() in the bash shell is replaced by the output of the command enclosed in the parentheses. It is equivalent to backticks (``), but can be cascaded more easily.

Examples:

rpm -ql $(rpm -qa)
for i in $(seq 1 1 100); do echo $i; done