Next Hold Space 38

Shell arithmetic

           % echo 23 / 7 | bc  -l
           3.28571428571428571428
  • No, two problems.

    1. bc turns out to be nonportable (!!)

      • (It has only been in Unix since June of 1974...)

    2. Calling out to bc all the time is really slow

      • Too slow for a command you want to run to set your prompt


Next Next