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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s