Previous Next Chapter

Splitting and Joining Lines

These commands split a line into more than one line and join together two or more successive lines.

Split line before <string>

S,B <string>

Splits the current line before the specified string. The first part of the line is sent to the output queue; the second part is made into a new non-original current line. Qualifiers can be used to restrict the context of the string.

Split line after <string>

S,A <string>

Splits the current line after the specified string. The first part of the line is sent to the output queue; the remainder of the line becomes the new current line. Qualifiers can be used to restrict the context of the string.

Join two lines

C,L [<string>]

Joins the current line with the next line of the source file. The string argument is optional; however, if a string is specified it is added to the end of the current line and that whole line is joined with the next line in the source file.

Renumbering Lines

These commands renumber the source file's lines to include non-original lines and to update a file that has been edited.

Renumber source lines

= <n>

Sets the current line number to <n>. All subsequent original and non-original lines below <n> are renumbered you move to them.

Return to the beginning source file

REWIND

Moves back through the source file to make line 1 the current line. EDIT scans the rest of the source file and writes the lines to the destination file. This file is closed and reopened as a new source file. Non-original lines are now recognized as original lines. Can be entered as REWI.

Verifying Lines

These commands describe different ways of verifying lines.

Turn Verification on/off

V + | -

Turns line verification on or off. If off, the lines are not displayed on the screen. To turn off, enter V -. To turn on, enter V +.

Verify the current line

?

Verifies the current line by displaying the line number and the contents of the line.

Verify the current line with character indicators

!

Produces two lines of verification. In the first line all non-graphic characters are replaced with the first character of their hexadecimal value In the second line, a minus sign is displayed under all positions corresponding to upper case letters and the second hexadecimal digit corresponds to non-graphic characters. All other positions contain spaces. In binary files, non-graphic characters are represented with question marks (??).

Inspecting the Source File

These commands advance through the source file, sending the lines it passes to the verification file, as well as to the normal output. They are known as Type commands because they display lines on the screen.

Type <n> lines to the screen

T <n>

Types the specified number of lines to the screen. The first line typed is the current line. Omitting the <n> continues typing to the end of the source file. Interrupt the command with Ctrl+C.

Type the lines in the output queue

T,P

Displays the lines currently held in the output queue.

Type until EDIT has replaced all the lines in the output queue

T,N

Types from the current line forward until all the lines in the output queue are replaced. The previous contents are sent to the destination file.

Type with line numbers

T,L <n>

Similar to the T command. Types a specified number of lines, displaying the line numbers. EDIT displays + + + + for inserted or split lines since they do not have line numbers.

Making Global Changes

These commands start and stop global changes. Global changes take place automatically as EDIT scans the source file in forward direction. These commands automatically apply an A, B, or E command, as appropriate, to any occurrence of <string1> in a new current line. They also apply to the current line that is in effect when the command is given.

GA [qualifier] <string1> <string2>
GB [qualifier] <string1> <string2>
GE [qualifier] <string1> <string2>

For example, if you want to change DF0: to DF2: throughout an entire file, enter:

GE /DF0:/DF2:/

Cancel a global command

CG [<id number>]

Cancels a global command. The identification number set with a GA, GB, or GE command is output to the verification file or the serene if EDIT is interactive. If no argument is specified, all global operations are cancelled. To cancel a specific operation, enter the identification number of the CG command.

Suspend a global command

SG [<id number>]

Suspends a global command. All global operations are suspended if no argument is given. Enter the identification number to suspend a specific operation.

Enable a global command

EG [<id number>]

Resumes global operation that had been suspended with the SG command. Unless a specific identification number is provided, all global commands are resumed.

Show global commands

SHG

Displays the current global commands and their identification numbers. Also provides the number of times each global string was matched.

Top Previous Next Chapter