sample session related to “command expansion” in Bash shell

$a=`time`

real	0m0.000s
user	0m0.000s
sys	0m0.000s
$a
bash: a: command not found
$a=`ls`
$a
bash: a: command not found
$echo a
a
$echo $a
a.txt b.txt trueangle
$echo `a`
bash: a: command not found

$a=`ls`
$b=time
$echo $b
time
$b=`time`

real	0m0.000s
user	0m0.000s
sys	0m0.000s
$echo $b

$b=`time`

real	0m0.000s
user	0m0.000s
sys	0m0.000s
$echo $b

$b=date
$echo $b
date
$b=`date`
$echo $b
Fri Apr 22 22:50:27 IST 2016
$


http://mywiki.wooledge.org/BashFAQ/032

Leave a comment

Your email address will not be published. Required fields are marked *