Mail Archives: djgpp/2003/01/29/10:00:16
Peter S Tillier wrote:
> "Charles Sandmann" <sandmann AT clio DOT rice DOT edu> wrote in message
> news:3e37507d DOT sandmann AT clio DOT rice DOT edu...
> ...
> A further experiment, prompted by a posting in
> comp.lang.awk (where this all started out) by Andrew
> Graham gives this odd looking result:
>
> c:\>ver
>
> Microsoft Windows 2000 [Version 5.00.2195]
>
> c:\>echo %COMSPEC%
> C:\WINNT\system32\cmd.exe
>
> c:\>gawk "BEGIN{print ENVIRON[\"COMSPEC\"]}"
> C:\WINNT\SYSTEM32\COMMAND.COM
>
> c:\>
>
> i.e., despite ver and echo %COMSPEC% saying that
> we're using cmd.exe, DJGPP gawk's ENVIRON array
> thinks that we're using COMMAND.COM
Similar result in WinNT
F:\MCOLLADO>ver
Windows NT Versión 4.0
F:\MCOLLADO>echo %COMSPEC%
C:\WINNT\system32\cmd.exe
F:\MCOLLADO>gawk "BEGIN{print ENVIRON[\"COMSPEC\"]}"
C:\WINNT\SYSTEM32\COMMAND.COM
F:\MCOLLADO>gawk --version
GNU Awk 3.1.1
Copyright (C) 1989, 1991-2002 Free Software Foundation.
...
Adding the following line to DJGPP.ENV:
[gawk]
...
COMSPEC=C:/WINNT/system32/cmd.exe
gives the expected result
F:\MCOLLADO>gawk "BEGIN{print ENVIRON[\"COMSPEC\"]}"
C:/WINNT/system32/cmd.exe
Hope it helps,
--
To reply by e-mail, please remove the extra dot
in the given address: m.collado -> mcollado
- Raw text -