Both sides previous revisionPrevious revisionNext revision | Previous revision |
sed:print [2020/08/17 09:00] – 192.168.1.1 | sed:print [2020/12/22 16:05] (current) – peter |
---|
====== SED - Print ====== | ====== SED - Print ====== |
| |
| [[SED:Print:Print|Print]] |
| |
[[SED:Print:Print 1 line of context before and after regexp, with line number indicating where the regexp occurred|Print 1 line of context before and after regexp, with line number indicating where the regexp occurred]] | [[SED:Print:Print 1 line of context before and after regexp, with line number indicating where the regexp occurred|Print 1 line of context before and after regexp, with line number indicating where the regexp occurred]] |
| |
| [[SED:Print:Print a random line|Print a random line]] |
| |
[[SED:Print:Print a specific line number|Print a specific line number]] | [[SED:Print:Print a specific line number|Print a specific line number]] |
| |
| [[SED:Print:Print all of file EXCEPT section between 2 regular expressions|Print all of file EXCEPT section between 2 regular expressions]] |
| |
[[SED:Print:Print every Nth line|Print every Nth line]] | [[SED:Print:Print every Nth line|Print every Nth line]] |
| |
[[SED:Print:Print first N lines of a file|Print first N lines of a file]] | [[SED:Print:Print first N lines of a file|Print first N lines of a file]] |
| |
| [[SED:Print:Print last line of a file|Print last line of a file]] |
| |
| [[SED:Print:Print last 2 lines of a file|Print last 2 lines of a file]] |
| |
| [[SED:Print:Print last N lines of a file|Print last N lines of a file]] |
| |
| [[SED:Print:Print line immediately after a regexp, but not the line containing the regexp|Print line immediately after a regexp, but not the line containing the regexp]] |
| |
| [[SED:Print:Print line immediately before a regexp, but not the line containing the regexp|Print line immediately before a regexp, but not the line containing the regexp]] |
| |
[[SED:Print:Print lines of N characters or longer|Print lines of N characters or longer]] | [[SED:Print:Print lines of N characters or longer|Print lines of N characters or longer]] |
[[SED:Print:Print section of file based on a range of line numbers|Print section of file based on a range of line numbers]] | [[SED:Print:Print section of file based on a range of line numbers|Print section of file based on a range of line numbers]] |
| |
[[SED:Print:Print section of file from regular expression to end of file|Print section of file from regular expression to end of file]] | [[SED:Print:Print section of file between two regular expressions (inclusive)|Print section of file between two regular expressions (inclusive)]] |
| |
[[SED:Print:Print the last line of a file|Print the last line of a file]] | [[SED:Print:Print section of file from regular expression to end of file|Print section of file from regular expression to end of file]] |
| |
[[SED:Print:Print the last 2 lines of a file|Print the last 2 lines of a file]] | |
| |
[[SED:Print:Print the last N lines of a file|Print the last N lines of a file]] | |
| |
[[SED:Print:Print the line immediately after a regexp, but not the line containing the regexp|Print the line immediately after a regexp, but not the line containing the regexp]] | |
| |
[[SED:Print:Print the line immediately before a regexp, but not the line containing the regexp|Print the line immediately before a regexp, but not the line containing the regexp]] | |
| |