Kevin P. Fleming
kpfleming at linuxfromscratch.org
Sun Nov 28 16:39:40 PST 2004
ken_i_m at elegantinnovations.net wrote:
> Ah, interesting. To my eye it somewhat obscures what is going on. The
> '10#' bit won't be found in the date manpage. The manner in which I
> happen to write it makes it a little more obvious that it is
> bash-centric syntax. I think I'll throw a comment on it just to make
> sure that next fellow who looks at it understands why it is there.
Having been that "next fellow" before, I'd say that's a really good idea
You are right, your syntax makes it clearer that bash is being asked to
concatenate the strings together... but keep in mind that just because
the "10#" isn't in the date manpage doesn't really mean anything. It's
possible to do this:
date "+Foo bar baz %H is better than baz bar foo %M"
And very little of this is in the manpage :-) In fact, the manpage
doesn't exactly make it clear that literal text will be copied through.
However, the "info date" page does. In addition, the infopage refers to
the fact that date uses strftime() to do the formatting, the manpage for
which also explicitly says that ordinary characters are passed through
In other words, just because it's not obvious doesn't mean it it's not
safe to use it <G>. It is well-documented and expected behavior.
More information about the lfs-chat