b
bfs(1) | bfs(1) |
NAME
bfs - big ®le scanner
SYNOPSIS
bfs
DESCRIPTION
bfs is similar to ed except that it is
Normally, the size of the ®le being scanned is printed, as is the size of any ®le written with the w com- mand. The optional - suppresses printing of sizes. Input is prompted with * if P and a
bfs supports the Basic Regular Expression (RE) syntax (see regexp(5)) with the addition that a null RE (e.g., //) is equivalent to the last RE encountered. All address expressions described under ed are sup- ported. In addition, regular expressions can be surrounded with two symbols besides / and ?: > indicates downward search without
The e, g, v, k, n, p, q, w, =, ! and null commands operate as described under ed. Commands such as -
xf file | Further commands are taken from the named ®le. When an |
| rupt signal is received or an error occurs, reading resumes with the ®le containing the xf. |
| Xf commands may be nested to a depth of 10. |
xo [ file ] | Further output from the p and null commands is diverted to the named ®le, which, if |
| necessary, is created mode 666. If ®le is missing, output is diverted to the standard output. |
| Note that each diversion causes truncation or creation of the ®le. |
:label This positions a label in a command ®le. label is terminated by a
(.,.)xb/regular expression/label
A jump (either upward or downward) is made to label if the command succeeds. It fails under any of the following conditions:
1.Either address is not between 1 and $.
2.The second address is less than the ®rst.
3.The regular expression does not match at least one line in the speci®ed range, including the ®rst and last lines.
On success, . is set to the line matched and a jump is made to label. This command is the only one that does not issue an error message on bad addresses. Thus it can be used to test whether addresses are bad before other commands are executed. Note that the command
| xb/label |
|
| is an unconditional jump. |
|
| The xb command is allowed only if it is read from someplace other than a terminal. If it is | |
| read from a pipe only a downward jump is possible. |
|
xn | List the marks currently in use (marks are set by the | k command). |
xt number | Output from the p and null commands is truncated to at most number characters. The ini- | |
| tial number is 255. |
|
Section 1−46 | − 1 − |