cat your_text_file | xargs -n1 date On 3/3/07, Vern Sun <s5unty@gmail.com> wrote:
准确的说:文件file中的每一行,都将作为参数传递给系统调用date 在07-3-3,Vern Sun <s5unty@gmail.com> 写道: > 一个文本文件file,文件中的每个参数用来传递给一个系统调用,假设系统调用为date,文件内容为: > - 8< ---- > "+%Y" > "+%m" > "+%d" > - 8< ---- > > 问题是如何用一条命令,把文本文件中的每一行,依次传递给date? > > 谢谢! > > -- > Vern -- Vern