ED use

xiaoxiao2021-03-06  17

Basic application:

1, $ n print file content, and add tribute information

N to the N-N line (n is a number)

n Displays the content of the current line (n is character)

D Delete the line

/ xx / find XX

? XX? Reverse lookup XX

/ / Find the next one

S / STR1 / STR2 / current row replace STR1 is STR2

NS / STR1 / STR2 / replaced STR1 in the NS line STR2

A, C, I Operation in the current row (A: Add C: Modify line content I: Insert before row)

Command parameters:

Ed file

At the time of error, H provides simple help information, H provides detailed help information, enters the input mode with A, C, I, use it alone, back to the command format save file w. Wq = x

p.p shows the current line

= Show the line number of the current line

NP display NP line

1,6p shows 1-6 lines

$ P Shows the last line

1, $ P Shows all rows

Show next line

- Display a line

n Show the current line and the line number

NN Displays NP and line numbers

X, YN display X-Y line and line number

l Display the current line includes non-print characters

D Delete the current line

u Cancel the last command

S / STR1 / STR2 replaces STR1 with STR2

S / STR1 / / Delete STR1

STR1 of 2S / STR1 / STR2 / N RV is changed to STR2 and displaying a modified line

S / STR1 / STR2 / G replace

, m

2, 4M6 2-4 line movement to Chain 6

T block copy format with M

R file After reading the file to the current line

, w file write blocks to files

! cmd execution shell command

/ Mode / forward lookup command

? mode? Reverse lookup command

// Continue to find the second

G / the / P look up and display

G / the / s / the / That / full search of That instead of THE

V Contrary to the g command

V / The / n full lookup does not contain THE and display

Unmanageless

^ Represents the first right of the first. Arbitrary characters * Any number of other characters

/A..................

. s /. /. 1st. Current line

2nd. Arbitrary characters

Item 3. Character

S / XX * / Y / with Y instead of 2 or more x

S / X * Y / Y / with Y instead of all characters that end with Y Y Y

& Represents the first mode content

/ Mode 1 / (mode 1) / = / mode 1 / (&) /

[xz] Represents X or Z

[0-9] Indicates any number of 0-9

转载请注明原文地址:https://www.9cbs.com/read-41326.html

New Post(0)