16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

the construct 'x. This is called an absolute address, because it always<br />

refers to the same line, regardless of changes to the buffer.<br />

.,.l Displays the addressed range of lines, representing nonprintable (control)<br />

characters in a visible manner. The end of each line will be marked with a<br />

’$’ character. The characters listed in the Base Definitions volume of IEEE<br />

Std 1003.1-2001, Table 5-1, Escape Sequences and Associated Actions (<br />

’\\’, ’\a’, ’\b’, ’\f’, ’\r’, ’\t’, ’\v’ ) shall be written as the corresponding escape<br />

sequence; the ’\n’ in that table is not applicable. If the variable _<strong>UNIX</strong>03 is<br />

set to YES,’$’ characters within the text will be written with a preceding<br />

backslash. ed sets the current line to the last line so displayed. You can<br />

append this subcommand to most other commands, to check on the effect<br />

of those subcommands.<br />

.,.ma Moves the addressed lines to the point immediately following the line given<br />

by the address a. The address a must not be in the range of addressed<br />

lines. If address a is 0, ed moves the lines to the beginning of the buffer.<br />

The last line moved becomes the new current line.<br />

.,.n Displays the addressed lines in a way similar to the p command, but ed<br />

puts the line number and a tab character at the beginning of each line. The<br />

last line displayed becomes the new current line. You can append n to any<br />

subcommand (except for E, e, f, Q, r, w, or !) so that you can check on the<br />

effect that the subcommands had.<br />

P Turns on subcommand prompting if it is not already on. If you specified the<br />

–p prompt option on the ed command line, ed displays the prompt string<br />

whenever it is ready for you to type in another subcommand. If you did not<br />

include the –p option, ed uses the * character as a prompt. If subcommand<br />

prompting is currently turned on, issuing the P subcommand turns it off.<br />

.,.p Displays (prints) the addressed lines. The last line displayed becomes the<br />

new current line. You can append p to most subcommands, so that you can<br />

check on the effect that the subcommands had.<br />

You can append p to any subcommand (except for E, e, f, Q, r, w, or !) so<br />

that you can check on the effect that the subcommands had.<br />

Q Quits unconditionally, without checking for buffer changes.<br />

q Causes the editor to exit. If you have made changes to the buffer since the<br />

last save and you try to quit, ed issues a warning. Entering the q<br />

subcommand again lets you quit, regardless of unsaved changes.<br />

$r [file]<br />

Reads the contents of the file into the buffer after the addressed line. If the<br />

address is 0, ed places the text before the first line in the buffer. If you do<br />

not specify file, ed uses the remembered filename; if no remembered<br />

filename exists, file becomes the new remembered name. If file contains<br />

bytes that are not valid in the current character set, they are replaced by<br />

the rubout character.<br />

The r subcommand displays the number of bytes read from file unless you<br />

specified the –s option. The last line read from the file becomes the new<br />

current line. If file is replaced by !, the rest of the line is considered a shell<br />

command line, the output of which is to be read.<br />

.,.s/regexp/new/[flags]<br />

Searches the specified range of lines for strings matching the regular<br />

expression regexp. Normally the s subcommand replaces the first such<br />

matching string in each line with the string new. The s subcommand sets<br />

ed<br />

Chapter 2. Shell command descriptions 251

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!