|
If you do this:
var=date
echo $var
echo "$var"
you're just going to get the work "date" displayed. To run the date command and use its output, you need to do:
echo $(date)
echo $($var)
if you're using a modern shell. If you're using an antique shell:
echo `date`
echo `$var`
And next time please tell us which shell you're using.
|