[Top][All Lists]

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

Re: xargs --negate-interactive

From: James Youngman
Subject: Re: xargs --negate-interactive
Date: Sat, 16 Jul 2016 15:17:29 +0100

I quite like the idea.   Here's an example implementation of a flag that
could be used in a shell function/alias, if that's your thing.  Comments?

On Sun, Apr 17, 2016 at 9:12 PM, Bernhard Voelker <address@hidden>

> On 04/10/2016 04:26 PM, 積丹尼 Dan Jacobson wrote:
> >>>>>> "BV" == Bernhard Voelker <address@hidden> writes:
> > BV> Well, there are many possibilities, but there is already a way to
> > BV> to do it in xargs.  So what would you want to achieve by saving a
> RET?
> > BV> I don't think it's about the wearing of the ENTER key on your
> keyboard?
> >
> > Thank you. If there is a way to do
> > $ seq 99|sed s/^/URL_/|xargs -pn 9 $BROWSER
> > so I can browse 9 items at a time
> > with just hitting RET instead of y RET, please tell me.
> I'd personally go with some shell loop like:
>   seq 99|sed s/^/URL_/|xargs -n9 \
>     | while read urls; do \
>         read -p "$urls:" </dev/tty; \
>         $BROWSER $urls; \
>       done
> Of course, as the URLs may contain some special characters, you'd have
> to care about proper quoting or escaping/unescaping additionally.
> Nevertheless, xargs isn't primarily a tool to get and evaluate
> the user's approval to execute arbitrary tools; and I don't think
> it should support more ways of evaluating such approval.
> Have a nice day,
> Berny

This email is intended solely for the use of its addressee, sender, and any
readers of a mailing list archive in which it happens to appear.   If you
have received this email in error, please say or type three times, "I
believe in the utility of email disclaimers," and then reply to the author
correcting any spellings (and, optionally, any incorrect spellings),
accompanying these with humorous jests about the author's parentage.   If
you are not the addressee, you are nevertheless permitted to both copy and
forward this email since without such permissions email systems are unable
to transmit email to anybody, intended recipient or not.  To those still
reading by this point, the author would like to apologise for being unable
to maintain a consistent level of humour throughout this disclaimer.
Contents may settle during transit.  Do not feed the animals.

Attachment: 0001-xargs-add-new-option-interactive-default-yes-modifyi.patch
Description: Text Data

reply via email to

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