sed (GNU sed) 4.2.2 can do this:
$ printf 'foo
bar
baz' | sed r -
foo
bar
baz
or, after storing the text in a file:
$ printf 'foo
bar
baz' >/tmp/bar
$ sed r /tmp/bar
foo
bar
baz
But busybox sed can't:
$ printf 'foo
bar
baz' | busybox sed r -
sed: empty filename
$ busybox sed r /tmp/bar
sed: empty filename
$ printf '' | busybox sed 'r /tmp/bar'
<no output, although /tmp/bar size is 11 bytes>
$ busybox sed 'r /tmp/bar'
<waiting for stdin; ^D; no output>
The 'r' command is documented by GNU sed as a GNU extension. Still,
busybox sed documents the 'r' command as supported:
r [address]r file
Read contents of file and append after the contents of the
pattern space. Exactly one space must be put between r and the
filename.
Am I misinterpreting the documentation?
Cheers,
--
Cristian
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox