sed command in busybox

Alexander van Heukelum heukelum at freemail.nl
Thu Nov 17 13:00:54 UTC 2005


On Thu, 17 Nov 2005 13:24:52 +0100
 Bernhard Fischer <rep.nop at aon.at> wrote:
>On Thu, Nov 17, 2005 at 10:44:30AM +0100, carsten.hausel at ivv.de wrote:
>
>>sed /1, 5/d filename
>>
>>This doesn't work in busybox V1.0 (date 2005.09.23)
>
>On trunk ranges do not work too, fwiw.
>
>This one without ranges does, but from a quick glance, isn't tested
>in the testsuite:
>
>for i in $(seq 10);do echo $i;done | tee input | sed -e s/3/three/ >
>expected
>./sed -i '/3/c\
>three' input

Hi all,

Is there maybe some confusion about addresses and regexes?

sed -e 3s/./three/

This would select only line 3, and then convert the first non-newline
character in that line to "three". (other lines are unaffected)

sed 1,5d

This would delete lines 1 to 5.

Greetings,
   Alexander

>
>
>_______________________________________________
>busybox mailing list
>busybox at busybox.net
>http://busybox.net/cgi-bin/mailman/listinfo/busybox



More information about the busybox mailing list