Re: Base conversion within Base

2014-09-17 Thread Eduardo A . Bustamante López
> That said, I have no objection to Chet adding such a feature to Bash, > if he can think of a sane way to do it. If you have a patch that > implements it, it's possible he'll be willing to review it. I don't really see the point, that'd be just bloating the code base. That task is easy to accompl

Re: Base conversion within Base

2014-09-17 Thread Greg Wooledge
On Wed, Sep 17, 2014 at 08:46:28AM -0400, IT1 Stuart Blake Tener, USNR wrote: > In as much as bc only tells you which position in the string > "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" it corresponds too. > > Useless and incomplete without a script to complete it! Thus, a bug > worthy of being re

Re: Base conversion within Base

2014-09-17 Thread IT1 Stuart Blake Tener, USNR
Greg, I was requesting a feature in bash, due to the bugulance of bc. You are correct in theory, however, the construction you propose (due in no part to the fault of bash) yields an obfuscated and incomplete answer. In as much as bc only tells you which position in the string "012345678

Re: Base conversion within Base

2014-09-17 Thread Greg Wooledge
On Tue, Sep 16, 2014 at 02:45:42PM -0400, IT1 Stuart Blake Tener, USNR wrote: > It is rather simplistic to perform a conversion of a number from any > base to base 10 in bash using such construction as: echo $((36#AB1CDE1)) > > However, the greatness of the foregoing notwithstanding, it would be

Base conversion within Base

2014-09-17 Thread IT1 Stuart Blake Tener, USNR
Team, First let me start out by saying I appreciate in no uncertain terms the absolutely amazing effort that all of the folks involved with Bash have proffered from its infancy until now. In 2 words: Thank You! It is rather simplistic to perform a conversion of a number from any base to b