Example . View only the contents of the 第20-30 line within the Ett.txt file (100 rows).
Answer: First explain the seq command:
SEQ 5 represents a sequence of natural numbers for portrait printout
seq–s "" 5 indicates the horizontal printout of the natural number sequence of the number of natural numbers, each of which is connected by a space,
seq 2 5 represents a sequence of natural numbers for portrait printing of 2~5,
seq 1 2 9 represents the vertical printing of the 1~9 natural number sequence, where the step is 2,
Then use the seq command to write the 1~100 natural number sequence to Ett.txt, that is, there are 100 rows in Ett.txt, now view 20~30 lines, head-30 ett.txt | tail-11 command, where | Before you look at the first 30 lines of the Ett.txt file, and then give the result to the command after the |,tail-11 is looking at the last 11 rows, then in general the last 11 rows (20~30) are viewed in the first 30 rows (1~30).
The same command is possible,
However, the above two commands are not easy and can be completed with sed–n 20,30p ett.txt command.
Linux-34-linux Basic Command one by one (l005-16)