Re: expr(1) diff 2 of 3, make it able to accept c-style radix prefixes in integers

2011-01-15 Thread Janjaap van Velthooven
On Fri, Jan 14, 2011 at 10:39:53PM -0800, Philip Guenther wrote: [snip relevant discussion to sidetrack a bit.] So, what's the answer for someone wanting to do base conversion? If they use sh/ksh, then the answer is $((...)): $ echo $((0x20)) 32 $ csh shmucks^Wusers can use bc or dc

Re: expr(1) diff 2 of 3, make it able to accept c-style radix prefixes in integers

2011-01-15 Thread Benny Lofgren
On 2011-01-15 08.29, Philip Guenther wrote: On Fri, Jan 14, 2011 at 10:39 PM, Philip Guentherguent...@gmail.com wrote: On Fri, Jan 14, 2011 at 8:11 PM, Benny Lofgrenbl-li...@lofgren.biz wrote: + Makes it able to use C-style radix prefixes to integers in order to do calculations in octal and

expr(1) diff 2 of 3, make it able to accept c-style radix prefixes in integers

2011-01-14 Thread Benny Löfgren
Hi, Resubmitting the second change for review. Recap: + Makes it able to use C-style radix prefixes to integers in order to do calculations in octal and hexadecimal. In the olden days, early '80:s to be specific, I worked at a company that produced a unix flavour called D-NIX, which had

Re: expr(1) diff 2 of 3, make it able to accept c-style radix prefixes in integers

2011-01-14 Thread Philip Guenther
On Fri, Jan 14, 2011 at 8:11 PM, Benny Lofgren bl-li...@lofgren.biz wrote: + Makes it able to use C-style radix prefixes to integers in order to do calculations in octal and hexadecimal. In the olden days, early '80:s to be specific, I worked at a company that produced a unix flavour called

Re: expr(1) diff 2 of 3, make it able to accept c-style radix prefixes in integers

2011-01-14 Thread Philip Guenther
On Fri, Jan 14, 2011 at 10:39 PM, Philip Guenther guent...@gmail.com wrote: On Fri, Jan 14, 2011 at 8:11 PM, Benny Lofgren bl-li...@lofgren.biz wrote: + Makes it able to use C-style radix prefixes to integers in order to do calculations in octal and hexadecimal. ... Unfortunately, this would