home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
envedt1.zip
/
ENVEDIT.CMD
Wrap
OS/2 REXX Batch file
|
1994-03-09
|
1KB
|
39 lines
/* An OS/2 environment editor */
/* Copyright (c) Silvio Kuczynski, 1994 All rights researved */
'@echo off'
say "An OS/2 environment editor by Silvio Kuczynski"
say " "
say "Warning: This editor ONLY changes the environment for the CURRENT session !"
/* Create a file containing the environment strings */
'set > __env__'
/* Eliminates the NASTY need to define a type: */
call RxFuncAdd 'sysPutEA', 'RexxUtil', 'sysPutEA'
type = "OS/2 Command File"
typeinfo = "DFFF00000100FDFF'x || d2c(length(type)) || '00'x || type"
call sysPutEA "__env__", ".TYPE", "typeinfo"
/* Call the OS/2 system editor on the file */
e __env__
/* Add a set command in front of every line and run it */
lineread = 'temp'
do forever
lineread = linein(__env__)
if lineread = '' then leave
temp1 = insert(' ''set ',lineread)
setcommand = insert(temp1,'''')
interpret setcommand
end
/* Close and delete the file */
temp1 = stream('__env__','c','close')
'del __env__'