Re: getenv

new topic     » goto parent     » topic index » view thread      » older message » newer message

ChrisBurch2 wrote:
> 
> That is correct. If you set the variable to '' or ' ', then -1 is still
> returned
> as practically speaking trailing spaces are removed.
> 
> Its easy to work around
> 

That's not true on Linux. Behavior is different.

unset VARNAME
-1
export VARNAME=A
{A}
export VARNAME=
{}

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu