You both misread my mails, and I partly misread Michael's mail, which
lead to discussing things we all are aware of.

The intention of this $'x 10\nx 9' example was to show how people only
knowing the man page, but not POSIX or the info manual would use, and
actually do use, the option -n.

A real world example of such a useless use of -n, taken from
backuptool.sh shipped with some Android firmware images is:

    # Execute /system/addon.d/*.sh scripts with $1 parameter
    run_stage() {
    for script in $(find /tmp/addon.d/ -name '*.sh' |sort -n); do
      $script $1
    done
    }

And a reason why some people think this would work is for this is that
“compare according to string numerical value” is ambiguous.  A less
ambiguous replacement could be “compare according to string initial
numerical value”, but I assume there are way better ways to describe
this.

These are a lot of mails and words for such a small change …

* Bob Proulx [2016-05-14 14:55 -0600]:
> Carsten Hey wrote:
> > reopen 824346
>
> But you forgot to terminate the command with 'thanks' or 'stop' and
> therefore the entire rest of your message went to the control robot
> generating many parse errors.

I did.  I remembered that it would also work w/o this line, but not the
reason.  Assuming that the reason was that empty lines would stop
processing input obviously was wrong - the reason was that parse errors
are ignored and finally also lead to stop processing input.

> … Things seem to be going okay.  Then you trip over a snag.  You fall
> down. You shout, "Who put that snag there!  Someone is going to pay
> for this!"  And then go looking for something to blame for it.

AFAIK I never had such an error in a script, but I see such errors from
time to time in other scripts.

Carsten


P.S.: I appreciate your fast and comprehensive answers, even if we were
      talking past each other

P.P.S.: A misconfigured router somewhere in the internet might be the
        reason that my mail did not hit the list: “(conversation with
        eggs.gnu.org[208.118.235.92] timed out while sending end of
        data -- message may be sent more than once)”

Reply via email to