SED - Print

Print

Print 1 line of context before and after regexp, with line number indicating where the regexp occurred

Print a random line

Print a specific line number

Print all of file EXCEPT section between 2 regular expressions

Print every Nth line

Print first line of file

Print first N lines of a file

Print last line of a file

Print last 2 lines of a file

Print last N lines of a file

Print line immediately after a regexp, but not the line containing the regexp

Print line immediately before a regexp, but not the line containing the regexp

Print lines of N characters or longer

Print lines of less than N characters

Print lines which match a regular expression

Print lines which do NOT match regexp

Print paragraph if it contains string

Print paragraph if it contains string1 and string2 and string3 (in any order)

Print paragraph if it contains string1 or string2 or string3

Print section of file based on a range of line numbers

Print section of file between two regular expressions (inclusive)

Print section of file from regular expression to end of file