command: sed [options] Flow Editor, change file additions and deletions, three Musketeers dick
Parameters:
-N: Cancel default output
P: (print) printing
e.g. sed-n ' 20,30 ' P ett.log print ett.log 20-30 lines of content
e.g. sed-n ' $ ' p ett.log print the last line in Ett.log, $ is the end of the file
Command: awk [options] filter output, Three Musketeers boss
Parameters:
e.g.
[email protected] log]# awk ' nr>19&&nr<31 ' Ett.log
Explanation: NR is a line number
Command: grep [options] Three Musketeers old three
Parameters:
-A: In addition to displaying a matching row, and displaying the NUM lines after thatline (after)
-B: In addition to displaying a matching row, and displaying the NUM line before the line (before)
-C: In addition to displaying a matching row, and displaying the previous and subsequent NUM lines
linux-Command-sed-awk