Mail Archives: djgpp/1998/02/22/06:51:20
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 -