Next time, you may try searching the net or this forum, this question is very common.
When you provide more information, such as the script LANGUAGE you are using, you will get better results.
another way that would work in bash/ash/tcsh/... is
varname=`command`
(where the ` are french accents grâve, not apostrophies.)
|