sed command in busybox

Rob Landley rob at landley.net
Thu Nov 17 13:49:07 UTC 2005


On Thursday 17 November 2005 03:44, carsten.hausel at ivv.de wrote:
> Hello,
>
> i have a small problem with the following issue:
>
> I need to replace a range of lines in a file.
> I read about how to use sed in general and found the following
> information:
>
> To delete the lines 1 to 5 :
>
> sed /1, 5/d filename
>
> This doesn't work in busybox V1.0 (date 2005.09.23)
> Is this sed somehow different?

The busybox sed is a completely different (and much smaller) implementation 
than the gnu version.  That said, we handle this right.

The correct syntax is sed "1,5d" filename.  If you put / / around it, it 
treats it as a string match.  (Our behavior here matches the gnu version, I 
just tested both.)

Rob





More information about the busybox mailing list