On Mon, Dec 05, 2005 at 02:55:44PM +0300, Sergey Sedov wrote:
> Good day,
> 
> It's impossible to use xargs with interactive program such as apt-get.
> When I try to do following:
> #cat del
> foo
> bar
> #cat del | xargs apt-get remove

Or, more efficiently, 

# xargs apt-get remove < del


> The apt-get program terminates, after question:
> Do you want to conginue ? [Y/n]
> I suppose, that apt-get receives the eof symbol from xargs and then 
> terminates.

stdin for xargs is, in your example, the pipe from cat.  Therefore
apt-get can't get an interactive answer from you.

> Is it a bug?

No, it isn't.  However, you couls always upgrade to findutils version
4.2.8 or later, where xargs has an --arg-file option which you can use
like this:

# xargs --arg-file=del apt-get remove 

This will allow xargs to invoke apt-get with stdin unchanged, so
apt-get would work.

Regards,
James.


_______________________________________________
Bug-findutils mailing list
Bug-findutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-findutils

Reply via email to