i have bash variable automatically updated. let's using toy example:
now=`date` echo $now
say when called it, be
thu sep 1 21:20:13 pdt 2016
the second time call (say using echo $now
), want $now
updated current time instead of thu sep 1 21:20:13 pdt 2016
, how it?
for purpose create function prints date:
now() { date }
and use this:
echo "this message being printed on $(now)"
Comments
Post a Comment