Nik*_*ohl 54
你可以用尾巴
从联机帮助页中摘录:
Run Code Online (Sandbox Code Playgroud)-n, --lines=K output the last K lines, instead of the last 10; or use -n +K to output lines starting with the Kth
例如
tail -n +10 file
Run Code Online (Sandbox Code Playgroud)
输出从第10行开始的文件内容
Ala*_*ins 11
sed -n '3,$p' file
Run Code Online (Sandbox Code Playgroud)
这只是填充文本,因为stackoverflow不支持短命令行.
你可以awk像这样使用:
awk 'BEGIN{n=5}NR<=n{next}1' file
Run Code Online (Sandbox Code Playgroud)
BEGIN{n=5}- 在文件处理开始之前,设置n为要跳过的行数(5).NR<=n{next}- 如果行号小于或等于,则跳过处理n.1- print其他一切的简写.