【发布时间】:2023-02-14 11:42:14
【问题描述】:
所以,我试图删除许多 .txt 文件的前 23 行。这就是我目前正在做的事情:
sed -i -e 1,23d * .txt
但它给了我一个奇怪的错误:
sed: Applications: in-place editing only works for regular files
我不知道该怎么做。谢谢你!
_
【问题讨论】:
所以,我试图删除许多 .txt 文件的前 23 行。这就是我目前正在做的事情:
sed -i -e 1,23d * .txt
但它给了我一个奇怪的错误:
sed: Applications: in-place editing only works for regular files
我不知道该怎么做。谢谢你!
_
【问题讨论】:
像这样:
sed -i -e '1,23d' *.txt
# ^
# no space between * and .txt
【讨论】: