> hello,
> I want to use ntool to redirect output of dhcp to wattcp.cfg.
> I am confused by the -g command line option. what does <str> mean?
> does anyone know what I would enter, using ntool to redirect output of dhcp 
> to wattcp.cfh?

The short answer is: NTOOL -g " " > WATTCP.CFG

Use one (or more) space characters enclosed in a pair of quotatation marks for 
<str>. This would give you something like:

MY_IP=192.168.1.1
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
NAMESERVER=192.76.23.54

which is exactly what you need as a (minimal) WATTCP.CFG file. If you need a 
more sohisticated WATTCP.CFG set-up, you could write a second file (say 
WATTCP0.CFG), that holds all those entries not provided by NTOOL. e.g. like 
this:

TXBUFSIZE=8196
RXBUFSIZE=8196
PRINTER1NAME=LPT1

you would then add some lines like the following ones to your start-up batch 
file:

NTOOL -g " "     >  WATTCP.CFG
TYPE WATTCP0.CFG >> WATTCP.CFG

please observe the double chevrons in the second line, they cause the content 
of the second file to be appended to the first one. Otherwise you would just 
clobber it.

Now, what is the purpose of <str> at all?

The long answer is: It gives you more flexibility. If it is anything but a 
string that consists only of blanks, then <str> will be prepended to each line 
of NTOOL's output. If you try e.g.

NTOOL -g "SET "

(mind the space between the "T" and the closing quotation mark) then you would 
get something like this:

SET MY_IP=192.168.1.1
SET NETMASK=255.255.255.0
SET GATEWAY=192.168.1.254
SET NAMESERVER=192.76.23.54

re-directing this into a batch file and then calling that (secondary) batchfile 
from the primary one like this:

NTOOL -g "SET "  > SETPARM.BAT
@CALL SETPARM.BAT

will cause environment variables to be set with the respective values. These 
variables can then be further processed (used) in many ways.

Or you try 

NTOOL -g "ECHO " > IPCONFIG.BAT

which would mimic the IPCONFIG commmand known from other TCP/IP implementations.

The reason for the somewhat confusing character of <str> is that the routine 
within NTOOL that parses the command line only supports command line switches 
(like -g) that have either allways an argument or never. Optional arguments are 
not supported. Therefore the "dummy" string is required, even if you actually 
don't want to prepend anything. But i think, this is just an inconvenience, not 
a real problem.

BTW, do you know the meaning of the acronym RTFM?  :-)


___________________________________________________________
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to