Re: : Re: : Re: : bash script issue

"Walter Dnes" <waltdnes-SLHPyeZ9y/[email protected]> Thu, 4 Sep 2014 19:45:16 -0400
Newsgroups gmane.org.user-groups.linux.tolug
Message-ID <[email protected]>
On Wed, Sep 03, 2014 at 08:07:55PM -0400, Chris F.A. Johnson wrote

> $ q=0056789
> $ echo "$((10#$q+1))"
> 56790
> 
>    Or, if you want leading zeroes in the output:
> 
> printf '%08d\n' "$((10#$q+1))"

  Thanks.  It's stuff like this that makes this mailing list worthwhile.

-- 
Walter Dnes <waltdnes-SLHPyeZ9y/[email protected]>
I don't run "desktop environments"; I run useful applications
--
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