[ale] Bash/source question

David Corbin dcorbin at machturtle.com
Sat Mar 15 06:59:16 EST 2003


They're output as:
X=1
Y=2

I'll try the "eval" approach suggested by Danny Cox.

Geoffrey wrote:

> Does the command output the data to standard out?  What is the format? 
> Is it 'var=value' ?  Or does it just output the values?  You can 
> assign a bunch of values to the positional vars as follows:
>
> set $(your_command)
>
> If your_command outputs just the var values to standard out.  Then you 
> can access the values with $1, $2,...$N, where the first output value 
> is $1 and so on.
>
> David Corbin wrote:
>
>> I have a command that produces output which is a list of env variable 
>> assignments.  I would like to get those variables assigned to the 
>> executing shell script.  The only way I can figure out, is to send 
>> the output to a file, and then source it.  Is there a better way?
>>
>> Thanks
>> David
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://www.ale.org/mailman/listinfo/ale
>>
>>
>


_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list