全部博文(178)
分类: LINUX
2008-08-19 11:29:59
FIRST YOU MUST UNDSTAND WHAT IS MEANT OF PATTERN SPACE /HOLD SPACE .THEN TRY SOME PRACTICE TO FIND OUT A WAY THAT IT IS TRULY
AS SAME AS YOU THINK.
d Delete pattern space. Start next cycle.
D Delete up to the first embedded newline in the pattern space.
Start next cycle, but skip reading from the input if there is
still data in the pattern space.
h H Copy/append pattern space to hold space.
g G Copy/append hold space to pattern space.
x Exchange the contents of the hold and pattern spaces.
l List out the current line in a ``visually unambiguous'' form.
n N Read/append the next line of input into the pattern space.