Main index

Introducing UNIX and Linux


Overview
Using filters
      Collating sequence
      Character classes
Character-to-character transformation
Selecting lines by content
      Regular expressions
      Basic regular expressions
      Extended regular expressions
      Grep
Stream editor
      Sed addresses
Splitting a file according to context
Choosing between the three filters
More on Vi
Summary
Exercises

Sed addresses

empty matches all lines
number matches input line
numbernumber1,number2 matches all lines in the range from number1 to number2 inclusive
$ matches the last input line, and can also be used in place of number2 in the previous type of address
/BRE/ matches any line matched by BRE

Copyright © 2002 Mike Joy, Stephen Jarvis and Michael Luck