HP-UX Reference (11i v2 07/12) - 1 User Commands A-M (vol 1)
b
bs(1) bs(1)
plot(10, string) sets the line mode to string.
plot(11, x1, y1, x2, y2) makes (x1,y1) the lower left corner of the plot-
ting area and (x2,y2) the upper right corner of
the plotting area.
plot(12, x1, y1, x2, y2) causes subsequent x (y) coordinates to be multi-
plied by x1 (y1) and then added to x2 (y2) before
they are plotted. The initial scaling is
plot(12, 1.0, 1.0, 0.0, 0.0).
Some requests do not apply to all plotters. All requests except zero and twelve are imple-
mented by piping characters to tplot.
Each statement executed from the keyboard re-invokes tplot
, making the results
unpredictable if a complete picture is not done in a single operation. Plotting should thus
be done either in a function or a complete program, so all the output can be directed to
tplot in a single stream.
last() in immediate mode, last returns the most recently computed value.
EXTERNAL INFLUENCES
Environment Variables
LC_COLLATE determines the collating sequence used in evaluating regular expressions.
LC_CTYPE determines the characters matched by character class expressions in regular expressions.
If LC_COLLATE or LC_CTYPE is not specified in the environment or is set to the empty string, the value
of LANG is used as a default for each unspecified or empty variable. If
LANG is not specified or is set to the
empty string, a default of "C" (see lang(5)) is used instead of
LANG. If any internationalization variable
contains an invalid setting,
bs behaves as if all internationalization variables are set to "C". See
environ(5).
International Code Set Support
Single-byte character code sets are supported.
EXAMPLES
Using bs as a calculator ($ is the shell prompt):
$bs
# Distance (inches) light travels in a nanosecond.
186000 * 5280 * 12 / 1e9
11.78496
...
# Compound interest (6% for 5 years on $1,000).
int = .06 / 4
bal = 1000
for i = 1 5*4 bal = bal + bal*int
bal - 1000
346.855007
...
exit
The outline of a typical bs program:
# initialize things:
var1 = 1
open("read", "infile", "r")
...
# compute:
while ?(str = read)
...
next
# clean up:
close("read")
...
# last statement executed (exit or stop):
86 Hewlett-Packard Company − 7 − HP-UX 11i Version 2: December 2007 Update