[BusyBox] sed questions.

Matt Kraai kraai at alumni.carnegiemellon.edu
Fri Feb 2 16:41:00 UTC 2001


On Fri, Feb 02, 2001 at 11:23:51AM -0500, Richard June wrote:
> I don't think this is strictly related to busybox, but it could be, is 
> there anyway to make sed(GNU, busybox or otherwise) to honor the \n 
> escape sequence? I would like to be able to something like this.
> echo HELLO |sed s/LL/\n/g
> and have it output this.
> HE
> O
> Anyone got any tips?

Both GNU and BusyBox sed don't recognize the \n escape sequence,
but you can still get the behavior you want:

$ echo HELLO | sed -e 's/LL/\
/g'
HE
O
$ 

Matt





More information about the busybox mailing list