Message-ID: <3E37E718.6030301@lml.ls.fi.upm.es> Date: Wed, 29 Jan 2003 15:37:12 +0100 From: Manuel Collado User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: gawk 3.1.1 DJGPP v2.04 on Windows 2000 Pro problem using system() function and LFNs References: <3e360683 DOT sandmann AT clio DOT rice DOT edu> <3e37507d DOT sandmann AT clio DOT rice DOT edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 138.100.10.20 X-Trace: 29 Jan 2003 15:36:08 +0100, 138.100.10.20 Lines: 59 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Peter S Tillier wrote: > "Charles Sandmann" 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