"$( )" is the substitute to backticks (``) with an advantage of nesting commands without escapes and better readability. The only bottleneckness $( ) suffers from is lack of portability.
For Example,
VAR=`date +%D`
echo "The date is: $VAR"
or
echo "The date is: `date +%D`"
The above lines can be replaced with the following one :
echo "The date is: $(date +%D)"
For Example,
VAR=`date +%D`
echo "The date is: $VAR"
or
echo "The date is: `date +%D`"
The above lines can be replaced with the following one :
echo "The date is: $(date +%D)"
No comments :
Post a Comment