[syslinux] ipappend and dos

ganapathy murali krishnan gmurali at cs.uchicago.edu
Wed Jun 9 12:28:35 PDT 2004

Couple of DOS based solutions...

** METHOD 1 **
http://www.pressroom.com/~tglbatch/pdate.html has a DOS Batch file to 
parse the current DATE. You may be able to use this to parse the ip 
address as well.

** METHOD 2 **
Another useful utility is "SENVAR.COM" (google search: first hit), it 
allows you to store the first line of any DOS program's output. If you 
can find a DOS port of the unix command "cut", you are in business. I 
have seen Native Windows ports (unxutils.sourceforge.net) but not yet 
come across a DOS port.

** METHOD 3 **
Should be simple to write a small C program which implements "cut -f1 
-d':' 12:34:56:78". This together with the SENVAR.COM (512 Byte COM 
file) should do the trick.

- Murali

Aaron McSorley wrote:

>I'm using ipappend and getargs.com with a dos boot image to
>get the environment variables for the IP and MAC. The format
>of the %ip% environment variable is
>  ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask>
>Is there a way to tell ipappend to assign these to individual arguments.
>Or does anyone know a good way to parse each of these to individual variables in dos.
>What I want to get is
>  clientip=
>  bootserver=
>  gw=
>  netmask=
>And for the MAC the format is something like
>  BOOTIF=00-00-00-00-00...
>Anyone know how to strip out the dashes.
> -Aaron
>SYSLINUX mailing list
>Submissions to SYSLINUX at zytor.com
>Unsubscribe or set options at:
>Please do not send private replies to mailing list traffic.

More information about the Syslinux mailing list