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

Re: [PATCH] latest ash has broken 'echo' command



On Fri, Oct 22, 1999 at 07:35:47PM +0200, Marek Habersack was heard to say:
> * Marcus Brinkmann said:
> > > True, but I have to KNOW wheter the feature is supported by the given
> > > product or not, right?
> > 
> > Trivial:
> > 
> > marcus@ulysses[0]:/tmp$ echo -n | wc
> >       0       0       0
> > marcus@ulysses[0]:/tmp$ echo -- -n | wc
> >       1       2       6
> > 
> > Writing a shell fucntion around it which returns yes or no is left as an
> > exercise to the reader :)
> Hmm... not quite that good :)). wc is in /usr/bin, that's first. If the test
> is put in a loop, then we end up with something which unnecessarily slows
> down the script, just to test whether the feature is supported (I know,
> nobody should put such a test in a loop :))).

  How about this:

 (bash:)
bash-2.02$ [ -z `echo -n` ] && echo yes || echo no
yes

 (ash:)
$ [ -z `echo -n` ] && echo yes || echo no
no

  Or am I missing something which makes this not so good?

  Daniel

-- 
  "People would panic?"
  "Very briefly, I'm afraid."

     -- The dangers of colliding with a star examined;
           Terry Pratchett, _The Light Fantasic_


Reply to: