home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
coned02.zip
/
coned
/
README
< prev
next >
Wrap
Text File
|
1996-12-20
|
3KB
|
63 lines
coned02 : non-interactive command-line config.sys editor
This is a command line config file editor that I whipped up in an evening.
I'm releasing this into public domain in hopes that you might find it useful.
The C++ source is embarassingly bad, but it works (or it seems to). If you
clean it up and make modifications, enhancements, I'd like to see them. I
guess I could have used sed or awk to do this, but STL makes this soooo
much easier, it's almost fun.
This in combination with rexx scripts to add program objects is what I use to
quickly get my system running quickly. I've had to re-install OS/2 several
times recently, and it ain't no fun.
Execute "coned" with no arguments for instructions. See the example.cmd
for how I use it.
coned config.tmp add path h:\usr\bin
coned config.tmp add libpath h:\usr\dll
coned config.tmp add dpath h:\usr\som\msg
coned config.tmp add var tmp=h:\tmp
coned config.tmp add run h:\usr\bin\telnetd.exe
When adding a path, libpath or dpath compenent, coned will append if it
doesn't exist, or replace it if it does exist.
When adding a variable It will replace it if it exists, or append to the
end of the file it it doesn't. Note that it considers anything with an
= sign to be a variable. So, MAXWAIT=1 and SET INCLUDE=h:\include are
both considered variables. If the variable doesn't exist, it will be appended
in the form of "SET VAR=XXX".
Source is included. Compiled with Watcom 10.5, STL is required, and you
may need to tweak the include files.
Known problems:
It doesn't edit every aspect of the config file. BASEDEV and DEVICE lines in
particular, but I don't see a need for that.
I've only tested the add function. The get and del functions may or may not
work.
Some inconsistancies in handling different lines.
No guarantees, warrantees, or liability assumed for use or misuse of this
software. But I welcome comments and suggestions.
You have the source... Read it.
You have backups... Don't you?
--FUTURE--
I thought it might be nice if a reverse process were available to be able
to convert an existing config.sys into a script that could be used to
reconstruct the file. Maybe I'll do this if I feel motivated to. What do you
think?
Wouldn't it be nice if Warp had a standardized _SYSTEM_ install/uninstall
like AIX does (Warp4 seems to have something though...)?
--REVISIONS--
coned01: oops. I made a "harmless" change before I uploaded and forgot
to test it. This version couldn't add any variables. Software engineering
at its finest.
Eddy Kim
ehkim@ibm.net