[BusyBox] Re: Bug Report:BB 1.00 sed

Hiroshi Ito ito at mlb.co.jp
Tue Nov 2 12:41:41 UTC 2004


From: Rob Landley <rob at landley.net>
Subject: Re: [BusyBox] Re: Bug Report:BB 1.00 sed
Date: Tue, 2 Nov 2004 01:06:15 -0600
> sed "" test /dev/null
> cat test /dev/null | sed ""
> 
> Then again, these two produce also different outputs (but the both busybox and 
> gnu produce the same two outputs), and it makes sense that they do...

  Yes, To tell the truth, I don't like this behavior.
  I think this two example should produce a same output.
  but nobody will listen and understand this claim.
  ( and I can't say strongly, becouse I don't know exactly
    how traditional sed was worked. )
  So, I should understand GNU implementation, and follow
  how GNU do it...

Mostly same problem are in sh,
  # echo a b | (read a; echo $? $a)
  0 a b
  # echo -n a b | (read a; echo $? $a)
  1 a b	    <- return value of read is depend on EOF.
  #
  this means "while read ...; do" is not enough to process whole of file.
  bash and GNU ash works same.
  The line, whitch does not end with newline,
  is undefined(=implimentation dependent) is enough.
--------
Hiroshi Ito
Media Lab. Inc.,
URL http://www.mlb.co.jp ( Sorry, Japanese only. )
TEL +81-3-5294-7255  FAX +81-3-5294-7256




More information about the busybox mailing list