[TxMt] export property list keys as BASH variables

Hans-Joerg Bibiko bibiko at eva.mpg.de
Mon Nov 20 08:44:03 UTC 2006


Hi,

I just figured out that in BASH you cannot export an array to make it  
visible for subshells.

Any suggestions how to deal with this?

One chance would be instead of making a BASH array to create a string  
variable which is certain structure. Then you have to split this  
variable in BASH, perl, ruby, etc by hand.
An other chance would be to create n+1 variables, i.e if you have an  
array TMD_output=("A" "b" "c and d") you could generate
TMD_output_0=3    # how many items
TMD_output_1="A"
TMD_output_2="b"
TMD_output_3="c and d"


Greetings

Hans-Jörg

On 19 Nov 2006, at 20:20, Hans-Joerg Bibiko wrote:

> Hi,
>
> of course I forgot something.
>
> In order to be able to have access from a perl, python, ruby, etc.  
> script I export these BASH variables now.
>
> On the other hand there is still one question:
>
> I set the value to an empty string if the given key is not set as  
> key witin the plist. Is there a better way? I believe it is ok and  
> the user has to catch this by itself.




More information about the textmate mailing list