Q: Why do programmers always get Christmas and Halloween mixed up?
Walter Dnes
waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org
Thu Nov 4 02:54:57 UTC 2010
On Tue, Nov 02, 2010 at 11:36:35PM -0400, Chris F.A. Johnson wrote
> Or, if there can only be a single leading zero (as often happens
> when manipulating dates):
>
> echo $(( ${a#0} + ${b#0} ))
I need something generic that can handle multiple leading zeros. This
works with all sorts of zero-padded data.
--
Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org>
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list