小编use*_*791的帖子

如何使用 shell 命令删除文件的前 n 行和最后一行?

我有一个Element_query包含查询结果的文件:

SQL> select count (*) from element;

[Output of the query which I want to keep in my file]

SQL> spool off;
Run Code Online (Sandbox Code Playgroud)

我想使用 shell 命令删除第一行和最后一行。

shell grep pipe sed awk

46
推荐指数
5
解决办法
13万
查看次数

标签 统计

awk ×1

grep ×1

pipe ×1

sed ×1

shell ×1