Bug 720090

Summary: date doesn't have a %space
Product: [Fedora] Fedora Reporter: Paul <pnewell0705>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 14CC: dennis, kdudka, maxamillion, ovasik, p, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-11 17:04:25 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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!)