- Jul
- 9
- 0
this is peudo-batch (as in pseudo-code but in batch) of what I want! But I don't know the exact 4NT code to do it.
c:\>echo abc| %yyy
(I expect a variable called yyy to contain abc) so
c:\>set
....
yyy=abc
I want to be able to redirect output of a command to an environment variable
I did try going to typing HELP <ENTER>
and I also found from klaus meinhard's page that the INPUT command might do what I want. something about piping to INPUT.
But things I tried didn't work
I noticed something in HELP about the variable only being available to the child process.. that doesn't look promising.
I couldn't see examples in the HELP
The nice thing about DOS 6.22 help was it had examples!
http://www.vfrazee.com/ms-dos/6.22/help/
I know DOS a bit. I did a bit with batch files and remember it(before I knew of 4DOS). So I must be missing something to not see/figure out how to do something as simple as this.
c:\>echo abc| %yyy
(I expect a variable called yyy to contain abc) so
c:\>set
....
yyy=abc
I want to be able to redirect output of a command to an environment variable
I did try going to typing HELP <ENTER>
and I also found from klaus meinhard's page that the INPUT command might do what I want. something about piping to INPUT.
But things I tried didn't work
I noticed something in HELP about the variable only being available to the child process.. that doesn't look promising.
I couldn't see examples in the HELP
The nice thing about DOS 6.22 help was it had examples!
http://www.vfrazee.com/ms-dos/6.22/help/
I know DOS a bit. I did a bit with batch files and remember it(before I knew of 4DOS). So I must be missing something to not see/figure out how to do something as simple as this.