Re: [dev] Associative arrays implementation in rc shell scripts

From: Stuart Morrow <>
Date: Thu, 17 Jan 2013 22:39:59 +0000

The best thing would be to have the shell have a syntax for arithmetic,
but then call out to bc to do the actual handling (because then you get
trigonometry and literally everything that bc knows how to do, with only
a minimal modification to the shell).
Syntactic sugar for a heredoc to bc itself.

And in the code attached to the original post, what's the outer "if" for?
No-one is ever going to call it with anything other than two args.
But I'm nitpicking. Maybe protection is better than readability.

Received on Thu Jan 17 2013 - 23:39:59 CET

This archive was generated by hypermail 2.3.0 : Thu Jan 17 2013 - 23:48:04 CET