Shell script

christian rek2 at screamdesign.com
Fri Jun 16 17:20:05 EDT 2000


use
variable=$(command)

example
my_date=$(date +"%d %b")

echo $my_date


El mar, 13 jun 2000, Anthony J. Gabrielson escribi)Bó:
> Hello,
> 	I have what I hope to be an easy question.  How do I make the
> output of a command, it will be a number, assign to a variable.  I'm using
> bash - I have been reading through several books on this and I'm starting
> to get frusterated.
> 
> Thanks,
> Anthony
> 
> -
> Subcription/unsubscription/info requests: send e-mail with
> "subscribe", "unsubscribe", or "info" on the first line of the
> message body to discuss-request at blu.org (Subject line is ignored).
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list