tak*_*hin 0 ubuntu bash text grep pipe
当我运行一些 bash 命令时,它返回2..n文本行(n每次都不同,可能包含空行)。
如何过滤输出以显示跳过第 1 行和第 2 行的结果?
例如
$ my_command
file1
file2
file3
file3
$ my_command | some_filter
file3
file4
Run Code Online (Sandbox Code Playgroud)
$ my_command | tail -n +3
Run Code Online (Sandbox Code Playgroud)
在这种情况下,+3意思是“在文件的第三行开始输出”。
| 归档时间: |
|
| 查看次数: |
177 次 |
| 最近记录: |