Done Help for SET to include @ExecStr[] hint

May 29, 2011
17
0
Seattle
Redirected output does not work with SET. e.g.
Echo %_Day | Set Day=%@Line[con,0]
does NOT work because it gets set in a child (pipe) instance and
environment variables are not propagated back to the parent.

use instead for example
Set Day=%@ExecStr[Echo %_Day]

Please add this in the help file ... this problem confounded me forever ... until vefatica enlightened me.
 

samintz

Scott Mintz
May 20, 2008
1,355
12
Solon, OH, USA
hint

Alternatively, you can use in-process pipes
with the caveat that in-process pipes are not supported in TCC/LE.

Echo %_Day |! Set Day=%@Line[con,0]

-Scott

TonyT <> wrote on 06/02/2011
03:16:40 PM:


> Redirected output does not work with SET. e.g.
> Echo %_Day | Set Day=%@Line[con,0]
> does NOT work because it gets set in a child (pipe) instance and
> environment variables are not propagated back to the parent.
>
> use instead for example
> Set Day=%@ExecStr[Echo %_Day]
>
> Please add this in the help file ... this problem confounded me
> forever ... until vefatica enlightened me.
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-