[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Recomended tutoial(s) on doing arithmetic in Bash scripts



On 03/05/2017 12:41 PM, Richard Owlett wrote:
On 03/05/2017 01:48 PM, David Christensen wrote:
On 03/05/2017 07:42 AM, Richard Owlett wrote:
I'm interested in "expr" and "bc".
The man pages lack reasonable examples.
The tutorial/HOWTO pages confuse the issue with fancy page layouts
and/or code samples showing how impressive the author can make the
script's output.

Suggestions please.

https://www.perl.org/

Browsing the site I found some unintended humor - "The behavior of
binary arithmetic operators depends on whether they're used on numbers
or strings." http://learn.perl.org/faq/perlfaq4.html

That's not unintended humor, that's a bug in the documentation. It should say:

    "The behavior of bitwise operators depends on whether they're
    used on numbers or strings."


I've filed a bug report -- thanks for the tip.


More seriously, the site demonstrates to convey useful information to
different audiences. I suspect I'm going get even less sleep ;>

Thank you.

YW. If you're interested in Perl 5, "Learning Perl" is the canonical introductory text:

   http://shop.oreilly.com/product/0636920049517.do


David


Reply to: