Hewlett-Packard Company - 3 - Version B.l, October 1986
BANNER(l)
NAME
banner - make posters in large letters SYNOPSIS
banner strings DESCRIPTION
HP·UX i:' -'1.NNER( J)
Banner prints its arguments teach up to 10 characters long) in large ietten: on the standard out-put.
Each ?rgulllf'nt is on a separate line.
SEE ALSO echo(l).
Hewlett-Packard Company "" 1
-BASENAME ( 1) HP-UX BASENAME(l)
NAME
basename, dirname extract portions of path name::;
SYNOPSIS
basename string suffix 1 dirname s,ri::~;
DESCRIPTION
Basename delete::; any prefix ending in / and the suffix (if present in strmg) from string, and prints the resuh. on the standard output. It is normally used inside command substitution marks ( ... ") ""T~thl:n shell proredurc=:.
Dirname delivers all but the last level of the path name in string. If string does not contain a dirretory component. dirname returns '.'.". indicating the current workin!?; directory
EXAMPU~S
The iOllowil1!!; srwH script. invoked with the argument jusr/src/cmd/cat.c, compiles the named fiic> anti mo','!';; thr output to a file n<lmpd cat in the CUfrt'nt dlrect:Jr:,
(C ~i
INTERNATION-lL SOPPdHr
- 1 - Version B.l, October 19Sf:
BASIC(l) BASIC(l)
This command requires installation of optional Technical BASIC software (not included with the standard HP-UX operating system) before it can be used.
DESCRIPTION
FILES
This command invokes the HP-UX Technical BASIC interpreter which can be used to execute BASIC commands or run BASIC programs.
The BASIC SHELL command is used when you need to temporarily exit the BASIC environment and spawn a new Bourne shell, from which you can execute any number of HP-UX commands. To terminate the shell and return to BASIC, type CTRL-D.
The following option is recognized:
-t causes the BASIC interpreter to operate in non-line-oriented mode. (Using this option only makes sense when running BASIC on a line-oriented terminal, since all other consoles and terminals will automatically run in non-line-oriented mode. See "line-oriented terminal" in the Glossary of the HP-UX Technical BASIC Reference Manual if you are not sure whether or not your terminal is line-oriented.)
There are two situations in which this mode is useful:
1. When you are using BASIC program lines or commands that exceed the width of a sin-gle liIte on the terminal screen (usually 80 characters). Refer to the "Line Length" dis-cussion in the Introduction section of the HP-UX Technical BASIC Reference Manual for further information about entering lines longer than the width of the screen.
2. When data-overrun errors occur during relatively high system use that are caused by a serial interface that has only a single-character buffer. Such interfaces lose occasional characters because they have insufficient buffer character space. This type of error does not occur when using interfaces that are equipped with multiple-character buffers such as the Series 200/300 Datacomm Interface or Series 500 ASI card.
/usr /bin/basic are written in another language but which can be called from BASIC).
used when creating C binaries.
a shell script used for creating Pascal binaries.
a file that is used when creating Pascal binaries.
a shell script used for creating FORTRAN binaries.
a file that is used when creating FORTRAN binaries.
(Series 200/300 only) a library that is used instead of libc.a when creating binaries.
/usr /lib / examples/basic/ geLstarted/
*
demonstration programs that are discussed in the HP-UX Technical BASIC Getting Started manual.
Hewlett-Packard Company - 1 - October 1986
BASIC(l)
Series 200, 300, and 500 Only
SEE ALSO
BUGS
HP-UX Technical BASIC Getting Started Manual HP-UX Technical BASIC Programming Guide HP-UX Technical BASIC I/O Programing Guide HP-UX Technical BASIC Reference Manual HP- UX Technical BASIC Implementation Specifics HP-UX Technical BASIC Quick Reference
BASIC(l)
Depending on system load, some characters may be missing from the start-up message (Basic ready 1.0) or termination message (Exiting Basic). This should not happen on single-user systems or on multi-user systems where only one person is currently using the system.
Hewlett-Packard Company - 2 - October 1986
'BC(l}
SY~DPSIS
l:~ [-i: r -I
n:"
DESCIW,"'T!ON
B.: is r'>7~ iLtrradive prcresscr for J~.;~r:u,,,g(; that f('semhles C tnt r;rc"ides ur:lilljteC prerisicl.;
,; ... ':t~ln:f'11C It ~r!_ke~ lr:put f:(:n: d.Lj '~l(S gi\?t-n. :li(~L r((~~":s 1.11(' ~tt\ihl::trd '~-".i~.~l. 'fhe ort1l'Es arT .~\S t>:,L~.;"v~:
,i
;.~ P 1'11f Cllly_ l-:r IS ~1(tuc-'.~~y ~'l pr~'I:tC('('~;,6C[ fiT i~('f i ~~ \',.:rdC1~ J;c iT.~ynkflS flutJd'i:lt-H'<!..l;Y, ;'~1-:r(ifyi;:;g C !"[('~~:I~'~ts jJt\,'('\\ltit:j~ ~'f tIc. ;;lld ~cEd~ the· de n~.r it tl~: t~.(
~tc-.~ldard f·.[i~ put.
C'}.l:Sf:S (lL ·.-1.;~:jtro'=-y p;E'rl~:;qC~; i~;a1L ~:~~r('~ry t~ .. ~)(' prf-''i.~·er:.r:{,tL ..I.~l~ ("!. ;:-.lde--eli£'CT: tne
"Cf:'Jf.~ lal"l{:.r ~~ ~t·t.
,- ,
1 .. ;2 ~r ilr:." fXr:f('SSlcn:
;" st;-;tf-'r;~':nt:
Ii r~:~'H;.t~ rf·latic~lal "xprf~~i~.L.
('t"f!-~r;;f~'t ~
~ t., L,·";f·\ 1 i ~ ~ j ' . . ~l; 1.t1 * / '
~ )lt~fr Orfr~rJJ~
;-l;-l::.tran:y lClli{ 1!.1l..!~1t.'c:-r-;; '~', :111 L
"'i:! (E \
f,
1_ ' E, ,E
L;F ~\ ;-p,-:;'-.'
f~~{ .~.~, rf~!:~~.lli'!tr {LL! J:~'~'C~
lU !t!.lj(:~~~-.~ (;tH-i'r..h-,r~ \:.:t ;,~! ~L f{_ \·.·Lf~ ;~,~«:
~>~-: !=- <.: .>
Hv,,-jnt- P ;;,(' kard C'mnpaIlY
' I
Be(l)
F\iilet.l'JH ;jt'fi:j~ti(jrl~
define L ( L ... , L ,I
1(X) j(n,x)
U'll ) 1.. ; L
3.J'ct ar~fCer~t Bes~d funrtL)!]
rIP-ex BC(I)
TOr;.,) ~·:a1af' ;)1' a ~:td.t ~'r'-i(-~=lt t hrit ;!"i an i?Xi,resSI:-Hl l~: t~ri!ltl·d uldes8 the rna:n ,}p{'r--t~,Jr i~ at.! ~Si5L>
:Ilt'llt. ]\;'u opt:'r .. ~f;,r, 'tn, df'[lIlCd for strings. but t~lt' strmg is printed if it ap;wars in a C'onic-xt
where an expn'ssi .. lIl re'>uit would ':.e ;)rilltt"l Eit!wl' semicolon"! <)r ne',v-lines may separclk st at(' :,,<:"ll" As~a6ilr;Je:lT t') ,<cait inriuPiH'(,S Hil' :,umbel of di)?;it;, L) tk !fLli:lt'd (D 'lr:rh,nct.c opef.
tiolls ill the mdrlP('r of de( 1) Assig:1:1H?Pt" tn I.b'.l3e e)f ob.18e set the i:lp;lt ~:td CJutpc.~ number r,'(rEx fP:';i1i:'ctivr-]y. :lgam :\..~ .Jcf:;lCd by ie( l;
~~})". S:E!\~: ;pt~;'! H.l:i.\· b(1 nSt'd --1..-",', a~l :llTily \ 3. fU'::!CL,,~_HL :1!l;.1 a sHnplc va.ridbl~ SlHli.lltd.rH'Ol.l:-~i). ,,\it
\dr;i:l.~ks Cil< g!"L,:tl ;') the pugnJ.la. "Aut,;" va.riab;f'~ are j)1Jshf'd down durin;?; funrtian Cil:~.
\\'tJea llsing arraYti aii fUIlCti'Jll !lrI?Ulllt'llt~ i)l' :jpSlling tbf'Iti 'l..'" 'lut'\2il'ltic v'!.ri:~hl('.o, empty sq1l<lri:
~)ra.(·kf:,ts rlJ'lst fothv.-the i1TT<tY nw:;e.
Tht % ,)perdlJI yeilLb the remain,lpI at :lw current scale, Iut the iHteger mt)dulus. ThuE'. at scal", I. 1?f, ~1 J:-' .J (!lIlt' tf'nth), :Jot j T.':us 1S 'JC(';l;lSi' (J.t sc.:1lt' 1) 7
!
3 i:; 2<1 .. vitIl .1 as tht>n-;:11d,1.iH.ll'l EXA~Vl?LE
FILES
:-:c.:llr == 20 jet-ii1\' t(:-.:; f
aUlU ~l. L,. ::, L
S ::::.: 1
hr(i=L 1==1' i++ l{
a :::.~ 3.*x h ~-' l>*J
C --::: 't /~ J
~ft (. :-:- :::-- '); r(,t:; r:1 (',
for(i=1. i<=l'J: i++) \00)
j,lrint,; appr()Ximdh' 'vahlPs of the exponential functlon of the first ten ilJteger~.
/Uiil/hm/d\
/'lsr /li};/!ib.h
df.'sk caicukttur proper nnt lH'matH' al Hbrary
Version B.l, October 198~
BC(l) HP-UX
SEE ALSO BUGS
bs(l), dc(l).
There are currently no && (AND) or II (OR) comparisons.
The for statement must have all three expressions.
Quit is interpreted when read, not when executed.
BC(l)
Be's parser is not robust in the face of input errors. Some simple expression like 2+2 will tend to get it back into phase.
Hewlett-Packard Company - 3 - Version B.l, October 1986
BDIFF(l) HP-UX BDIFF(l)
NAME
bdiff - big diff SYNOPSIS
bdiff filel file2 [nJ [-sJ DESCRIPTION
FILES
Bdiff is used in a manner analogous to diff( 1) to find which lines must be changed in two files to bring them into agreement. Its purpose is to allow processing of files which are too large for diff.
Bdiff ignores lines common to the beginning of both files, splits the remainder of each file into n-line segments, and invokes diff upon corresponding segments. The value of n is 3500 by default.
If the optional third argument is given, and it is numeric, it is used as the value for n. This is useful in those cases in which 3500-line segments are too large for diff, causing it to fail. If filel (file2) is -, the standard input is read. The optional -s (silent) argument specifies that no diag-nostics are to be printed by bdiff (note, however, that this does not suppress possible exclamations by diff. If both optional arguments are specified, they must appear in the order indicated above.
The output of bdiff is exactly that of diff, with line numbers adjusted to account for the segment-ing of the files (that is, to make it look as if the files had been processed whole). Note that because of the segmenting of the files, bdiff does not necessarily find a smallest sufficient set of file differences.
/tmp/bd?????
SEE ALSO diff(l).
DIAGNOSTICS
Use help(l) for explanations.
INTERNATIONAL SUPPORT 8- and l6-bit data, 8-bit filenames.
Hewlett-Packard Company - 1 - Version B.l, October 1986
BFS( 1) HP-UX BFS(l)
NAME
bfs - tHg file sca.nner SYNOPSIS
bfs [ - 1 iHI.me DESCRIPTION
Bis is (almost) like ea(l) except that it is read-only and processes much larger files. Files can be up to 1024K bytes (the maximum possible size) and ~12K lines. with up to 512 characters, inciud-ing new-line, per line. BJs is usually more efficient than ed for scanning a file. since th(' !ik is DDt
c9pied to a buffer. It is most useful for identifying sections of a large file where c~pht( 1) can be '-ls\:'d to divide it into more manage>lble pieces for pditing.
Normally, the size of the file being scanned is printed, as is the size of any file written with the w command. The optional - suppresses printing-of sizes Input is prompted with
*
jf P and a car·riage return are typed as in ed. Prompt.ing can be tumed off again !Jy inputting arFlther P and carriage return. Note that messages are given in response to errors if prompting is turned ·)n.
All address expressions described under ed are supported. In additIOn, reg-uhr expressions may bt"
surrounded with two symbols besides / a,..d?: > indicates downward search without wrap-around, and < indicates upward search without wrap-around. SincE:' bf.~ uses a different regular expression-matching routine from ed. the regular expressions accepted are slightly wider in scope (see regcmp(3X)). There is a slight difference in mark na.mes: only the letters a through z may be '.lsed, aud ali 2G marks are remembered.
TIl<: e, g, v, k, ~, p, q, w. =, ! alHlnull commands uperate a..'i d.:~scril:Jed undu ed. Commands such as - - .
+++-, +++=,
-12, and+4p
arE:' accepted. Note that 1,lOp and 1,10 will both print the first ten lines. The f command only prints the name of the filt, bf'ing scanned: then' i~no remembered file name. The w command is independent of output diversioll, truncation, or crunchmg (<!N: the xo. xt alltl xc command~. beJm",} The followmg additlOnal commands are available.
xf Jile Further eomrnands are taken from the named jilt. \V11en aJ:1 end-:)f-fik is reached. an interrupt signal is received or an error occur~. readbg resumes w!th the file containing the xf. xf commands may ~ nested to a depth Zlf 10.
xo [file 1 Further output from the p and null commands is diverted to the named file, which, if necessary, is created mode 666. If jill' is missing, outP'1t is dlvertpd to
dl(' "t~T'\:,T'i O1JtP;l~. "-:r"r r~l.,1 r>a;-Ij (i1vrrsion.cll.lJ;;;'>'; trllIlcatiO[l ~'i (TPatal'l ;,f tlw file.
: labei This positIOns !'i labtl in a command hlp. The label is terminated by new-lint'.
and blanks twtween the: and the start of the label are ignore,i This command may also be used to insert comments into a command file. Slllce labf'l~ need n',}t
~)(' refpfenced
Ixl) / re!rUl'j.f I! .I~}T'" "C~1 l)TI./ ~ri, ~)I~ l
A jump (either upward or downward) is made to label if the command succee:l~.
It fails under any of the following conditions' 1. Either address is not between 1 and $.
2. The second address is le~ than the first
3. The regular expression doeR not match at least one line in the specified range. including the first and last Enes_
On success, . is set to the line matched and a jump is made to label. This com-mand is the only OIle that doesn't issue an error message on bad addresses. so it may be used to test whether addresses are bad before other commanQs art' €xt--cut{·d. 0iote that the command
Hewlett-Packard Company - 1 - Version B.l, October 1986
BFS{l) HP-UX BFS(l)
is an unconditional jump.
Tile xb command is allowed only if it is read from someplace other than a termi-nal. If it is read from a pipe only a downward jump is possible.
xn List the marks currently in use (marks are set hy the k command) xt 1wmh~r
Output from the p and null commands is truncated to at most number charac-ters. ~rhc initial nUlnber is 255.
xv!
digit] [space.~ ] [1Jaiue 1xbz label
Thf' variable name is the specified digit following the xv. xv5100 or xv5 100 both assif;,'li die value 100 to the variable 5. Xv61,lOOp assigns the value 1,lOOp to the variable 6. To reference a variable. put a % in front of the vari-able name. For exanlple. using the above assignments for variables 5 and 6:
1,"C.sp 1.%5
~,6
will all prmt the first 100 lines.
would globally search for the characters 100 and prmt each lme containing a mat!'h. Tr; (",cape the special meaning d %. 3. \. rr..ust precede it.
gj".*\%[cdsJ/p
could be used to match and list iines containing print! of characters, decimal inU"gers, or :;trings.
Another feature of the xv command is that the first line of output from an HP-UX ('(\mmand can be stor('d into a variable. Th only requirement is that the
fi!';;t ~haracter cf value t'€ an!. For example:
xv5!cat jur>.k
!rmjunk
!echo "%5"
xv6!expr o/c6
+
1would put the current line into variable 5, print it, and increment the variable 6 by one. To e8cape the special meaning of ! as the first character of value. pre-u-de it with a \.
xv7\'date
stores the value !date into variable 7.
xbn label These two commands will test the last saved return code from the execution of an HP-t'X system command (!command) for a zero or nonzero value, respec-rively, and cause a branch to the specified label. The two examples below both search for the next five lines containing the string size.
First example:
xv.s5
Hewlett-Packard Company - 2 - Version B.I, October 1986
BFS(l)
xc [switch]
: I /size/
xv5!expr %5 - 1
HP-UX
!if [ %5 != 0 ] ; then exit 2 ; fi xbnl
Second Example:
xv45 : I /size/
xv4!expr %4 - 1
!if [ %4 = 0 ] ; then exit 2 ; fi xbz I
BFS(l)
If switch is 1, output from the p and null commands is crunched; if switch is 0 it isn't. Without an argument, xc reverses switch. Initially switch is set for no crunching. Crunched output has strings of tabs and blanks reduced to one blank and blank lines suppressed.
DIAGNOSTICS
? for errors in commands, if prompting is turned off. Self-explanatory error messages when prompting is on.
SEE ALSO
csplit(l), ed(l), regcmp(3X).
INTERNATIONAL SUPPORT 8-bit data and filenames.
Hewlett-Packard Company - 3 - Version B.1, October 1986
BIFCHMOD (1) HP-UX BIFCHMOD (1) Series 200, 300, 500 Only
NAME
bifchmod - change mode of a BIF file SYNOPSIS
bifchmod mode device:file ...
DESCRIPTION
Bifchmod is intended to mimic chmod{l).
A BIF file name is recognized by the embedded colon (:) delimiter (see bif(4) for BIF file naming conventions) .
The permissions of each named file are changed according to mode, which may be absolute or symbolic. An absolute mode is an octal number constructed from the OR of the following modes:
4000 set user ID on execution 2000 set group ID on execution 1000 sticky bit, see chmod(2) 0400 read by owner 0200 write by owner
0100 execute (search in directory) by owner 0070 read, write, execute (search) by group 0007 read, write, execute (search) by others.
A symbolic mode has the form:
[ who 1 op permission [ op permission 1
The who part is a combination of the letters u (for user's permissions), g (group) and 0 (other).
The letter a stands for ugo, which is the default if who is omitted.
Op can be
+
to add permission to the file's mode, - to take away permission, or = to assign per-mission absolutely (all other bits will be reset).Permission is any combination of the letters r (read), w (write), x (execute), s (set owner or group ID) and t (save text - sticky); u, g or 0 indicate that permission is to be taken from the current mode. Omitting permission is only useful with = to take away all permissions.
Multiple symbolic modes separated by commas may be given. Operations are performed in the order specified. The letter s is only useful with u or g; t only works with u.
EXAMPLES
The first example denies write permission to others, and the second makes a file executable (using symbolic mode):
bifchmod o-w file bifchmod +x file
The next example below assigns read and execute permission to everybody, and sets the set-user-id bit. The second assigns read and write permission to the file owner, and read permission to everybody else (using absolute mode):
bifchmod 4555 file bifchmod 644 file
The following two examples perform the same function, namely to give read, write, and execute permission to the owner and read and execute permissions to everybody else for the BIF file /etc/script on /dev /rdsk/ls0:
bifchmod a=rx,U+w /dev/rdsk/ls0:/etc/script bifchmod 755 /dev /rdsk/ls0:/etc/script
Hewlett-Packard Company - 1 - Version B.1, October 1986
BIFCHMOD ( 1 ) HP-UX BIFCHMOD ( 1) Series 200, 300, 500 Only
AUTHOR
Bi/chmod was developed by HP.
SEE ALSO
bif(4), chmod(l), chmodt2).
Hewlett-Packard Company - 2 - Version B.1. October 1986
BIFCHOWN(l) HP-UX BIFCHOWN (1) Series 200, 300, 500 Only
NAME
bifchown, bifchgrp - change file owner or group SYNOPSIS
bifchown owner device:file ...
bifchgrp group device:file _ ..
DESCRIPTION
Bifchown and bl/chgrp are intended to mimic chown (1) and chgrp (1).
A BIF file name is recognized by the embedded colon (:) delimiter (see b;/(4) for BIF file naming conventions) _
B1fchown changes the owner of the files to owner. Owner may be either a decimal user ID or a login name found in the password file.
Bifchgrp changes the group ID of the files to group. Group may be either a decimal group ID or a group name found in the group file.
EXAMPLES
The examples that follow assume that a BIF directory structure exists on the HP-UX device file /dev /rdsk/lsO.
The first example sets the owner of the BIF file /users/abc/phone.num to adm:
bifchown adm /dev jrdsk/lsO:/usersjabc/phone.num
The second example sets the group ID of the SIF file /tmp/b.date to the decimal number 105:
bifchgrp 105 /dev /rdsk/lsO:/tmp/b.date AUTHOR
FILES
Bifchown was developed by HP.
/etc/passwd jete/group SEE ALSO
bif(4}, chown(1), group(4), passwd(4).
Hewlett-Packard Company - 1 - Version B.1, October 1986
BIFCP(l) HP-UX BIFCP(l) Series 200, 300, 500 Only
NAME
bifcp - copy to or from BIF files SYNOPSIS
bifep file1 file2
bifep file1 [file2 ... ] directory DESCRIPTION
Bifcp is intended to mimic cp{l).
A BIF file name is recognized by the embedded colon (:) delimiter (see bif(4) for BIF file naming conventions) .
Bifcp copies a BIF or HP-UX file to a BIF or HP-UX file, or list of files (HP-UX or BIF) to a directory. The last name on the argument list is the destination file or directory.
The file name '-' (dash) is interpreted to mean standard input or standard output, depending on its position in the argument list.
RETURNS
Bifcp returns exit code 0 if the file is copied successfully. Otherwise it prints a diagnostic and returns non-zero.
EXAMPLES
Copy the HP-UX file abc to the BIF file x/y /z within HP-UX device /dev /rdsk/1s0:
bifep abc /dev/rdsk/1s0:x/y/z
Copy BIF file /baekup/log within /dev /rdsk/1s0 to HP-UX file logeopy within the current directory:
bifep /dev /rdsk/1s0:/baekup/log logeopy
Copy BIF file archive within HP-UX device /dev /dsk/2s5 to standard output:
bifep /dev /dsk/2s5:arehive
-The following example copies the BIF files la, /b, and /e to the HP-UX directory /users/dave:
sdfep /dev /rdsk/2s3:/a /dev /rdsk/2s3:/b /dev /rdsk/2s3:/e /users/dave The last example shows how you can implement a cat{l) program for concatenating BIF files using bifcp in a shell script:
if[
$#
-It 1]then
echo "Usage: bifeat file ... "
exit 1
WARNINGS fi for i in $.
do
bifep $i-done
Note that the media should NOT be mounted before using bifcp.
The '-' (stdio) notation does not work in some situations.
AUTHOR
Bifcp was developed by HP.
SEE ALSO bif(4), cp{l).
Hewlett-Packard Company - 1 - Version B.1, October 1986
BIFFIND(l) HP-UX BIFFIND(l) Series 200, 300, 500 Only
NAME
biffind - find files in a BIF system SYNOPSIS
biftlnd path-name-list expression DESCRIPTION
Biffind is intended to mimic find(l).
A BIF file name is recognized by the embedded colon (:) delimiter (see bi/(4) for BIF file naming conventions).
Biffind recursively descends the directory hierarchy for each path name in the path-name-list (Le.,
Biffind recursively descends the directory hierarchy for each path name in the path-name-list (Le.,