Bug 720090 - date doesn't have a %space
Summary: date doesn't have a %space
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 14
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-09 06:15 UTC by Paul
Modified: 2011-07-13 04:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-11 21:04:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Paul 2011-07-09 06:15:15 UTC
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:
1.
2.
3.
  
Actual results:
Error

Expected results:
"whatever 08jul11 23:14"

Additional info:
Thanks in advance,
Paul

Comment 1 Pádraig Brady 2011-07-11 21:04:25 UTC
That's just a shell quoting issue. You want:

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

cheers

Comment 2 Paul 2011-07-11 21:17:17 UTC
[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

Thanks,
Paul

Comment 3 Ondrej Vasik 2011-07-12 07:50:25 UTC
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 04:55:08 UTC
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.