delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/09/04/00:00:38

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "one2001boy AT yahoo DOT com" <one2001boy AT yahoo DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: date.exe in shl2011b.zip
References: <CsRZc.14863$hL1 DOT 14760 AT newssvr27 DOT news DOT prodigy DOT com> <200409030334 DOT i833Y487011049 AT envy DOT delorie DOT com> <JiSZc.15226$cF4 DOT 7651 AT newssvr29 DOT news DOT prodigy DOT com> <t00gj0prgu7o9k0mo7n3ejtpj7ekr9jnh8 AT 4ax DOT com>
In-Reply-To: <t00gj0prgu7o9k0mo7n3ejtpj7ekr9jnh8@4ax.com>
Lines: 49
Message-ID: <0_a_c.15521$GR3.1990@newssvr27.news.prodigy.com>
NNTP-Posting-Host: 68.125.129.136
X-Complaints-To: abuse AT prodigy DOT net
X-Trace: newssvr27.news.prodigy.com 1094269948 ST000 68.125.129.136 (Fri, 03 Sep 2004 23:52:28 EDT)
NNTP-Posting-Date: Fri, 03 Sep 2004 23:52:28 EDT
Organization: SBC http://yahoo.sbc.com
X-UserInfo1: SCSGGVKEEZVQG]IRN[O AT _WH@YR_B AT EXLLBWLOOAFWIWTEPIB_NVUAH_[BL[\IRKIANGGJBFNJF_DOLSCENSY^U AT FRFUEXR@KFXYDBPWBCDQJA AT X_DCBHXR[C@\EOKCJLED_SZ AT RMWYXYWE_P@\\GOIW^@SYFFSWHFIXMADO@^[ADPRPETLBJ]RDGENSKQQZN
Date: Sat, 04 Sep 2004 03:52:28 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Brian Inglis wrote:
> On Fri, 03 Sep 2004 04:20:57 GMT in comp.os.msdos.djgpp,
> "one2001boy AT yahoo DOT com" <one2001boy AT yahoo DOT com> wrote:
> 
> 
>>DJ Delorie wrote:
>>
>>>>Now I have a question about date.exe in shl2011b.zip. why date.exe
>>>>work the same as msdos's built-in date.exe? I thought date.exe
>>>
>>>>from shl2011b.zip should work the same as binary date in unix.
>>>
>>>
>>>It's likely that you are still running the MS-DOS builtin date.
>>>
>>>Try ".\date" or run bash first.
>>
>>
>>under msdos
>>C:\>c:\fsf\bin\date.exe
>>Current date is Thu 09/02/2004
>>Enter new date (mm-dd-yy):
>>
>>
>>Under bash:
>>bash-2.05b$ c:/fsf/bin/date.exe
>>Thu Sep  2 21:22:48  2004
>>bash-2.05b$
>>
>>not sure what is magic here?
> 
> 
> MS-DOS command.com date is an internal command so it is matched in
> command's internal command table if no explicit path prefix is given;
> for internal commands, there is no way to get command to search the
> path.

That is true. It seems that bash can by pass this problem.
Not sure how it is done in bash.
I tried to write a program to call from createproess() instead of
system(), it seems that date.exe is still from msdos.

Thanks


> OTOH bash has no internal date command (unless you add one using a
> function definition or define an alias for date) so it has to search
> the path for a date program. 
> 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019