bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: allow xargs to read from file


From: Christer Ekholm
Subject: Re: allow xargs to read from file
Date: Fri, 20 Aug 2004 00:31:43 +0200

Tim Waugh writes:
 > On Thu, Aug 19, 2004 at 10:31:46PM +0200, Christer Ekholm wrote:
 > 
 > > > includes a patch to allow xargs to read from a file instead of
 > > > standard input.  This would allow interactive commands to be executed
 > > > by xargs, and I think that would be useful.
 > [...]
 > > I see no reason for it. Your shell is perfectly capable of redirecting
 > > the input from a file.
 > > 
 > > I can't se what you gain by writing:
 > > 
 > > $ xargs -a file_with_args command
 > > 
 > > instead of just:
 > > 
 > > $ xargs command < file_with_args
 > 
 > See above: the important word is "interactive".  If 'command' is an
 > interactive program, such as gdb or gpg, redirecting standard input
 > renders them useless.
 > 
 > With current CVS they will be reading from /dev/null.

You're right.  I kind of expected only stdin for xargs to be
redirected, leaving the terminal as stdin for the command.  But that
isn't the case.

Well, maybe my incorrect objection then can serve the purpose of
supporting your proposal instead.

--
 Christer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]