我有一个文件,最后三行如下。我想检索倒数第二行,即 100.000;8438; 06:46:12
.
.
.
.
99.900; 8423; 06:44:41
100.000;8438; 06:46:12
Number of patterns: 8438
我不知道行号。如何使用 shell 脚本检索它?提前感谢您的帮助。
最佳答案
试试这个:
tail -2 yourfile | head -1
https://stackoverflow.com/questions/7022390/