给定一个文件 foo.txt:
1 2 3 4 5
假设我们要将其更改为包含:
1 2 3
为什么head -n3 foo.txt > foo.txt将 foo.txt 留空?
head -n3 foo.txt > foo.txt
io-redirection head
head ×1
io-redirection ×1