bash error

ken_i_m at ken_i_m at
Sun Nov 28 16:06:37 PST 2004

On Sun, Nov 28, 2004 at 04:42:33PM -0700, Kevin P. Fleming (kpfleming at wrote:
> ken_i_m at wrote:
> >edit to
> >
> >  let t_stamp=(10#`date +%H%M`)
> >
> >does not result in an error message.  Adjusting the date to the midnight
> >hour on a test box this appears to work.  Cool.
> Thanks for letting us know that it worked :-) You can simplify this to:
>   let t_stamp=`date +10#%H%M`
> because the date command will pass through any literal text in the 
> provided format.

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.
I reason and act, therefore, ken_i_m
Chief Gadgeteer, Elegant Innovations
Founder, Bozeman Linux Users Group
(406) 581-0495

More information about the lfs-chat mailing list