make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Problems with echo. (echo period)


From: Dave Korn
Subject: RE: Problems with echo. (echo period)
Date: Mon, 23 Apr 2007 19:22:34 +0100

On 23 April 2007 19:10, Christopher Faylor wrote:


> I believe that the real issue here is that, in some cases, cmd.exe
> throws away a '.' after a built-in command.  So, it isn't, IMO, strictly
> correct to add an 'echo.'.  If we really wanted to do this, it seems
> like it would be better to recognize those built-ins which allow a '.'
> and eat a dot in those case.
> 
> cmd.exe's handling of '.' seems to be funky, though.  It isn't as simple as
> saying "just ignore the dot" since some commands (like dir or echo) seem to
> semi-ignore it while others (cd) seem to be almost short-circuited by it.
> 
> IMO, cmd.exe's handling of '.' in these scenarios is strange enough that
> it's best to just not bother with it in make, as Eli has maintained.
> Otherwise, it seems like we'd potentially be spending a lot of time
> tweaking corner cases or discovering that different versions of
> cmd.exe/command.com behave differently.


  It's not the only builtin that cmd.exe recognizes by parsing at the start of
the line and doesn't require to be separated by whitespace from its
arguments...


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\dk>echo.Foo
Foo

C:\Documents and Settings\dk>cd/DC:\tmp

C:\tmp>cd..


C:\>cd.

C:\>cd..

C:\>cd...

C:\>cd....

C:\>cd.......

C:\>cd......................

C:\>cd........................ \

C:\>cd........................ tmp
The system cannot find the path specified.

C:\>cd........................ temp
The system cannot find the path specified.

C:\>cd temp
The system cannot find the path specified.

C:\>cd tmp
The system cannot find the path specified.

C:\>cd \tmp

C:\tmp>



  Yeh, ok, I'm convinced.  Cmd.exe is pretty nutso and inconsistent in its
parsing and we'll only drive ourselves mad if we try and match it lunacy for
lunacy.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....





reply via email to

[Prev in Thread] Current Thread [Next in Thread]