bs.1 (2010 09)
b
bs(1) bs(1)
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
fori=15*4bal=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):
exit
# last input line:
run
Input/Output examples:
# Copy file oldfile to file newfile.
open("read", "oldfile", "r")
open("write", "newfile", "w")
HP-UX 11i Version 3: September 2010 − 7 − Hewlett-Packard Company 7