我试图删除除最后一行之外的所有文件行,但是以下命令不起作用,尽管file.txt不为空.
$cat file.txt |tail -1 > file.txt $cat file.txt
为什么会这样?
linux bash
bash ×1
linux ×1