Save the environment .. ;-)

Aug 3, 2016
376
9
Netherlands
This one gave me headaches:

Code:
TEST >unset abc

TEST >echo dummy text | set abc=something

TEST >set abc
TCC: Not in environment "abc*"

Problem is the "|" makes the next command to start a new instance of tcc
Any set variable will be lost when this instance exits.

What would be a good way to "save" abc?
(beside writing "abc=something" to a file and reading it afterwards)
 
May 20, 2008
11,538
103
Syracuse, NY, USA
See "Pipes" ... "in-process pipes".

Code:
v:\> unset /q abc

v:\> echo dummy text |! set abc=something

v:\> set abc
something
 
  • Like
Reactions: MaartenG
Similar threads
Thread starter Title Forum Replies Date
SeoulBigChris Save Environment (Tabs) on Exit? Support 3
RChrismon How to? Changes to Options Don't Save Support 8
R V19 - At startup, TCC save directory in the directory history list Support 2
T Fixed V18 debugger crashed on save button Support 1
I How to? Save and restore folder timestamps Support 22
M How to? Save the session log from a batch file? Support 5
M How to? Save and then restore "Echo" status Support 2
J Utility to Save/Restore current screen Support 16
R Toolbar - save to .INI Support 4
millardjk Save & restore font in IDE (10b68) Support 1
A TCMD10 doesn't save options until restarted Support 10
E Save TCC configuration Support 1
Peter Murschall v27.00.16/17: ENDLOCAL with exporting variables wipes out the complete Environment Support 2
T Is there a way to maintain the position in the environment list, while debugging? Support 10
D Unnecessary environment dependencies of TCC.EXE Support 3
T Portable Take Command installation for VDI environment Support 2
D v23 environment oddity Support 3
gschizas Take Command (Environment) doesn't show v2 ANSI colors Support 30
Charles Dye Read-only environment variables wiped by SETLOCAL / ENDLOCAL Support 5
J Shell nesting level, and inherited environment variables Support 10
J Set environment variable from stdout of command Support 3
nickles Passing a variable to a command w/o adding it to the local environment Support 7
vefatica Environment refresh? Support 0
rfaquino WAD Apparently a bug when expanding environment variable %ProgramFiles(x86) Support 2
B WAD environment variable in TCC.exe Support 2
fpefpe Documentation environment variables Support 3
fpefpe How to? Environment Variables changed Support 2
vefatica OT: Rex, how does CMD handle its environment? Support 0
M Updating environment variable from C++ fails erratically in version 14... Support 57
Frank problem with environment variable x86 vs. x64 Support 2
fpefpe volatile environment Support 5
daniel347x How to get Take Command to read in all current system environment variables that CMD.EXE sees? Support 13
D Environment in elevated process Support 1
Peter Bratton IDE environment window display Support 0
D Environment variable oddity Support 12
vefatica Got IDE's environment tab back Support 0
S blanks in environment variable paths Support 4
vefatica What environment variables does IDE need? Support 3
tinjaw Looking for best practice for custom environment on tabs Support 0
E Environment variable in tcmd.ini Support 14
I Environment variable in OPTION screen? Support 2
E Environment variables, set and input Support 2
J trouble redirecting output to environment variable Support 7

Similar threads