[Discuss] Bourne Shell variable assignment question
Jerry Feldman
gaf at blu.org
Thu Dec 15 16:35:09 EST 2011
On 12/15/2011 04:27 PM, Richard Pieri wrote:
> On 12/15/2011 4:25 PM, Peter Doherty wrote:
>> Of course, one has to ask why your co-worker is doing this, and not
>> just sourcing the file.
>> Also, my example will break if you have an equal sign in your
>> variable name or value name.
>
> This. Sourcing the file is going to be the fastest and most reliable
> way to do it.
>
This is 100% agreed. The issue is that he does not want to source the
file and I have not been able to talk him out of it. In the past I have
written scripts where you could read the name of a variable, and then
convert it to a variable name, but I don't think I've done it in Bourne
of BASH.
--
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id:3BC1EB90
PGP Key fingerprint: 49E2 C52A FC5A A31F 8D66 C0AF 7CEA 30FC 3BC1 EB90
More information about the Discuss
mailing list