[Gambas-user] User environment interrogation
Bruce
adamnt42 at gmail.com
Fri Feb 8 07:49:55 CET 2019
On 8/2/19 4:59 pm, T Lee Davidson wrote:
> On 2/8/19 12:12 AM, Bruce wrote:
>> (Quicky?) Is there an easy way to get a particular environment setting
>> for the current user.
>> IOW I want to get the result of (say)
>> echo $LD_LIBRARY_PATH
>>
>> tia
>> Bruce
>
> I have to think that I must be missing something, because this should be
> quite easy.
>
> Public Sub Main()
>
> Dim sOutput As String
>
> Shell "echo $LD_LIBRARY_PATH" To sOutput
> Print sOutput
>
> End
>
>
> ___
> Lee
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
Missing something? I think not, but my usual over simplification :-)
Trying again.
Does there exist in the gambas native libraries a way to interrogate the
current user's environment for any arbitrary setting?
I was looking for an answer to see if I was missing something in my
understanding of the User, System, Application etc classes that may save
me the effort of doing exactly what you said.
What I am really trying to do is something like this:
If User.Env["ZZ_ABSOLUTE_RUBBISH"] then
DoSomething_ProperLike
Else
Message.Error("blah,blah, blah. Die you Moron!")
Return 300KV_through_keyboard
Endif
I guess I'll have to write it myself.
cheers
B
More information about the User
mailing list