[Toybox] sed {N;N;} cmd test failure
    Felix Janda 
    felix.janda at posteo.de
       
    Wed Dec  3 23:37:33 PST 2014
    
    
  
Rob Landley wrote:
[..]
> I believe the toybox behavior is right?
> 
> We can simplify the above test by removing the p; entries that don't add
> a line to the output:
> 
>   echo -ne '1\n2\n3\n4\n' | sed -n '1{N;N;d};2,3p;4p'
> 
> Toybox just prints one 4, and gnu prints two of them. The difference is
> that "2,3p" is triggering on line 4 in gnu, and isn't in toybox.
[..]
Also note that gnu is inconsistent. Both
echo -ne '1\n2\n3\n4\n' | sed -n '1{N;N;d};2p;4p'
and
echo -ne '1\n2\n3\n4\n' | sed -n '1{N;N;d};3p;4p'
only give one 4.
Felix
 1417678653.0
    
    
More information about the Toybox
mailing list