delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/11/08:04:43

From: mh AT mike DOT franken DOT de (Michael Hirmke)
Subject: Re: make calls 'time' program bug
11 Sep 1998 08:04:43 -0700 :
Message-ID: <70cazmnKpfB.cygnus.gnu-win32@mike.franken.de>
References: <3 DOT 0 DOT 5 DOT 32 DOT 19980909084257 DOT 00a289d0 AT pop DOT ni DOT net>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hi Jeff,

[...]
>The system cannot accept the time entered.
>Enter the new time:
>
>I would assume that the time command being run is the windows-nt version,
>which tries to modify the system time, which isn't the unix-like time
>command.
>
>When I run the command line from bash, it times the command my_program.
>
>How do I fix this behavior?

Because "time" and "date" are commands, which are builtin into cmd.exe,
the only thing you can do is to redefine them with doskey.

I have a small batch, which contains the following commands:

doskey ddate=date
doskey setdate=%CYGWIN%\date $*
doskey date=%CYGWIN%\date "+%%A, %%d.%%m.%%Y"
doskey dtime=time
doskey time=%CYGWIN%\date "+%%H.%%M:%%S Uhr"
doskey dtype=type $*
doskey type=sh -c "type $*"

This changes the behaviour of the three builtin commands date, time and
type. Of course, for your purpose, it would be sufficient to just use
doskey dtime=time !


[...]
>	Thanks in advance,
>	Jeff Deifik

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh AT mike DOT franken DOT de
                         | WWW     http://aquarius.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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