cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/22/06:51:20

Date: Sun, 22 Feb 1998 13:50:35 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Jude Dashiell <dashiell AT clark DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: gdate program oddity
In-Reply-To: <Pine.GSO.3.96.980221104758.2302A-100000@shell.clark.net>
Message-ID: <Pine.SUN.3.91.980222135015.19567Z-100000@is>
MIME-Version: 1.0

On Sat, 21 Feb 1998, Jude Dashiell wrote:

> I can have output with gdate +"%A" or gdate +"%B" and both
> are correct but combine them and you get nothing.

Do you type this from COMMAND.COM?  If so, this is a misfeature of
COMMAND.COM: it treats `%' character specially (%foo% means the value
of environment variable `foo') and doesn't provide an easy way to
quote that character.

You need to type `%' twice in a row to get a literal `%'.  Try the
following, one of them should work for you:

	   gdate "+%%A %%B"
	   gdate "+%%%%A %%%%B"

Of course, from withing Bash, "+%A %B" works as well.

- Raw text -


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