[luau] Programming List

Ray Strode halfline at hawaii.rr.com
Fri Jun 7 19:15:01 PDT 2002


>
>
>Echo with a . prints a . so I am still looking for a way to print a blank
>line.
>  
>
I'm sorry, I just tried it and you can't put a space between echo and 
the period.  so it's "echo.",
not "echo ." like i put in my example.

>I figured out how to replace chars like this, but I wanted to delete the
>15th character in line 12 or remove the 5 spaces at the begining of line 4.
>
i'm not sure how to do the former, but the latter is ".r     "

>basically I repeat this:
>ping -n 1 %ROUTER_INTERNAL_INTERFACE% > %temp%\zzxyy003.tmp
>edlin %temp%\zzxyy003.tmp < %temp%\zzxyy001.tmp > nul
>fc /w %temp%\zzxyy002.tmp %temp%\zzxyy003.tmp > nul
>IF ERRORLEVEL 1 echo INTERNAL ROUTER INTERFACE (%
>ROUTER_INTERNAL_INTERFACE%) IS DOWN
>IF NOT ERRORLEVEL 1 echo INTERNAL ROUTER INTERFACE (%
>ROUTER_INTERNAL_INTERFACE%) IS UP
>
>nine times and just use different varables.  There must be a way for me to
>write this once and have it run 9 times with the correct information?
>  
>
i'd create a subbatch file that does those three lines and instead of
%ROUTER_INTERNAL_INTERFACE% use %1 and then shift and recall subbatch 
file.  If you
like I can play around with it and get some working code.

Another approach would be to use for. It's ironic that you want to use 9 
variables, because i believe
DOS has a limit of 9 parameters, so if you do the recursive approach it 
will just barely make it.

--Ray




More information about the LUAU mailing list