www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <4285F11D.EBA009C7@dessent.net> |
Date: | Sat, 14 May 2005 05:37:49 -0700 |
From: | Brian Dessent <brian AT dessent DOT net> |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: date.exe problem |
References: | <90f6e8270505140524314bf23b AT mail DOT gmail DOT com> |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
Natxo Asenjo wrote: > set hour=c:\cygwin\bin\date.exe > > if I then do: > > %date% +%H-%M > > that works as expected (interactively). But, if I use that in the > batch file, then it gives me "H" instead of the hour. It ommits the > '%' , does not interpret it and does not work. I am not sure if this > is a dos problem (my understanding of this is not very good, I am > afraid). In the windows command interpreter, % is a metacharacter. You have to escape it (as %%) if you want a literal %. This has nothing to do with date.exe or Cygwin. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |