[prev in list] [next in list] [prev in thread] [next in thread]
List: ethereal-dev
Subject: [Ethereal-dev] Re: Re: [Ethereal-users] timestamp problem
From: jfielding () ra ! rockwell ! com
Date: 2004-01-30 20:53:11
Message-ID: OF1E42E2C2.B7A42994-ON80256E2B.004A8AF7 () ra ! rockwell ! com
[Download RAW message or body]
This is a multipart message in MIME format.
--=_alternative 007266CE80256E2B_=
Content-Type: text/plain; charset="us-ascii"
Martin Regner wrote:
> J Fielding wrrote:
> >
> > It's only in bat files that % is treated specially, when you must say
%%
> > to mean the % char. So a batch file to text2pcap <name>.txt to
<name>.eth
> > might say:
> When I use % on my Windows 98 Swedish Edition from command line I get the
> problem - but not on Windows 2000, so it's not only related to bat-files.
I did a few tests and it looks like this is what Windows does with % on
the command line: In all versions tested, if the line contains %any text%
look for environment variable ANY TEXT, replace with expansion if found.
If not found, NT restores the original text but OT does not.
Tested with:
NT: WinNT4, Win2k
OT: Win95 (and Martin's previous Win98 tests were effectively the same)
Typical test: echo %test%junk
The %% work-around does work on Win95, so echo %%path%% gives %path%. It
doesn't work on WinNT - it gives %expansion of PATH%.
So in dos/windows % is treated specially in bat files. And in command
lines (inconsistently). And in the "for" command. And in the command lines
in Windows shortcuts. And in whatever else I forgot . . .
It is therefore a good idea to not require the use of % in any program's
command line arguments.
Julian.
--=_alternative 007266CE80256E2B_=
Content-Type: text/html; charset="us-ascii"
<br><font size=2 face="Courier New">Martin Regner wrote:</font>
<br><font size=2 face="Courier New">>J Fielding wrrote:<br>
>> <br>
>> It's only in bat files that % is treated specially, when you must say \
%%</font> <br><font size=2 face="Courier New">>> to mean the % char. So a batch \
file to text2pcap <name>.txt to <name>.eth<br> >> might say:<br>
<br>
>When I use % on my Windows 98 Swedish Edition from command line I get the</font>
<br><font size=2 face="Courier New">>problem - but not on Windows 2000, so it's \
not only related to bat-files. <br> </font>
<br><font size=2 face="Courier New">I did a few tests and it looks like this is what \
Windows does with % on the command line: In all versions tested, if the line contains \
%any text% look for environment variable ANY TEXT, replace with expansion if found. \
If not found, NT restores the original text but OT does not.</font> <br><font size=2 \
face="Courier New">Tested with:</font> <br><font size=2 face="Courier New">NT: \
WinNT4, Win2k</font> <br><font size=2 face="Courier New">OT: Win95 (and Martin's \
previous Win98 tests were effectively the same)</font> <br><font size=2 face="Courier \
New">Typical test: echo %test%junk</font> <br>
<br><font size=2 face="Courier New">The %% work-around does work on Win95, so echo \
%%path%% gives %path%. It doesn't work on WinNT - it gives %expansion of \
PATH%.</font> <br>
<br><font size=2 face="Courier New">So in dos/windows % is treated specially in bat \
files. And in command lines (inconsistently). And in the "for" command. And \
in the command lines in Windows shortcuts. And in whatever else I forgot . . .</font> \
<br> <br><font size=2 face="Courier New">It is therefore a good idea to not require \
the use of % in any program's command line arguments.</font> <br>
<br><font size=2 face="Courier New">Julian.</font>
--=_alternative 007266CE80256E2B_=--
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@ethereal.com
http://www.ethereal.com/mailman/listinfo/ethereal-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic