Bug 720090 - date doesn't have a %space
date doesn't have a %space
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2011-07-09 02:15 EDT by Paul
Modified: 2011-07-13 00:55 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-07-11 17:04:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Paul 2011-07-09 02:15:15 EDT
Description of problem:
I couldn't find "date" in the components, please file where appropriate

I can see that there is a %n for newline and a %t for tab, but I do not see a %whatever to indicate a space. I am trying to do a `date +%d%b%y %T` and it barks over the T. I can get what I want by {`date +%d%b%y` 'date +%T`}, but this seems silly to have to call date twice just to get a space inbetween. The padding doesn't help as far as I can see

Version-Release number of selected component (if applicable):

How reproducible:
[...] | mail -s "whatever `date +%d%b%y %T`" whoever.localhost

Steps to Reproduce:
Actual results:

Expected results:
"whatever 08jul11 23:14"

Additional info:
Thanks in advance,
Comment 1 Pádraig Brady 2011-07-11 17:04:25 EDT
That's just a shell quoting issue. You want:

mail -s "whatever `date '+%d%b%y %T'`" whoever.localhost

Comment 2 Paul 2011-07-11 17:17:17 EDT
[pained look of "egg on face"]

tested and, course, this is what I should have done rather than submitting a bug. I appreciate your correcting my misuse of shell

Comment 3 Ondrej Vasik 2011-07-12 03:50:25 EDT
btw. if you want to know a name of component in future, consider using something like rpm -qf `which date` (replace date with the utility you are interested in) , which will let you know which package provides the commandline utility. As there is only 1 component per source rpm, repoquery -s <package name> might be useful as well.
Comment 4 Paul 2011-07-13 00:55:08 EDT
Thanks for the suggestion. I gave it a test drive and it definitely will help my bug-reporting (I know I can use the help!)

Note You need to log in before you can comment on or make changes to this bug.