如何在不知道文件行数的情况下将文本文件的最后 n 行移动到顶部?是否可以使用单个命令行(sed例如)来实现这一点?
sed
从:
... a b c d
到:
a b c d ...
bash command sed
bash ×1
command ×1
sed ×1