[BUG] sed: command "r" wrong behaviour

Xose Vazquez Perez <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <[email protected]>
hi,

- First case with command "i", it works OK.
$ cat  f.txt
1
2
3
$ sed -i '1 i\Hello' f.txt
$ cat  f.txt
Hello
1
2
3

- Second case with command "r", It doesn't work.
$ cat  f2.txt
1
2
3
$ cat h.txt
Hello
$ sed -i '1 r h.txt' f2.txt
$ cat  f2.txt
1
Hello
2
3

In second case the line with "Hello" must be the first one,
like the first case with the command "i"

-thanks-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.