Posted by Peter Palfrader on 2000-03-07
Dere ADnoctum!
ADnoctum schrieb am Dienstag, den 07. März 2000:
> Hi,
>
> I have a config file that loks like this:
>
> variable1=value1
> variable2=value2
> ..
>
> Is there a way(in bash) to get the value of the variable1 w/o the
> "variable1=". I tried grep but it prints the entire line...
hmm, why not source the file with
source /path/to/file/that.looks.like.this
then you can refer to the variables as easily as $variable1,
$variable2, etc
to print a variable's value use echo:
echo $variable1
HTH
yours,
peter
--
PGP encrypted messages prefered.
http://www.cosy.sbg.ac.at/~ppalfrad/
To signoff send a mail to listserver@xxxx.xx.xx with
"signoff tcg" in the body of your message.
Previous post | Next post | Timeline | Home