HP3000-L Archives

September 2013, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"James B. Byrne" <[log in to unmask]>
Reply To:
James B. Byrne
Date:
Wed, 11 Sep 2013 16:22:59 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
On Wed, September 11, 2013 13:51, Barry Lake wrote:

>
> If you'd like to clean this up a bit -- and I'd highly recommend
> doing so if you're going to use this technique in more than a
> single location -- then you could make a few small improvements to
> enhance readability.
>
> First, note that the quotes inside the shell...
>
>   echo "31.1 * 4.7" | bc
>
> ...are required only in order to prevent the shell from "globbing"
> (that is, performing wildcard expansion on) the asterisk "*". You
> can also prevent globbing by escaping the asterisk, which removes
> the need for the embedded quotes:
>
>   /SYS/PUB $ echo "31.1 * 4.7" | bc
>   146.1
>   /SYS/PUB $ echo 31.1 \* 4.7 | bc
>   146.1
>
> That would make your XEQ command at the CI a bit cleaner:

Thank you again.  I have no requirement for anything but an integer value in
the application that prompted this thread.  It is just that the intermediate
calculations do require decimal fractions.  And this is only ever going to be
used in one place inside a single JOB STREAM file as far as I can predict.


Thanks again.

-- 
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:[log in to unmask]
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2