小编Jam*_*son的帖子

为什么 `xargs head` 打印文件名?

给定两个文件, a.txt内容为:A1b.txt内容为:B1

执行时printf "a.txt\nb.txt" | xargs head -1

我希望它输出

A1
B1
Run Code Online (Sandbox Code Playgroud)

但它输出

==> a.txt <==
A1

==> b.txt <==
B1
Run Code Online (Sandbox Code Playgroud)

为什么它输出文件名?以及如何禁用文件名的输出?

linux shell xargs

3
推荐指数
1
解决办法
2619
查看次数

标签 统计

linux ×1

shell ×1

xargs ×1