a) Variable set/access
varname='some text'b) store command output to a variable
echo $varname
varname=`somecommand`
echo $varname
or,
an alternate way to do it
varname=$(some command)
echo $varname
eg. - to store current timestamp in a variablec)s
current_timestamp=`date +%s`
echo $current_timestamp
egd)
ege)
egf)
egg)
eg
No comments:
Post a Comment