bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] sed: command "r" wrong behaviour


From: Xose Vazquez Perez
Subject: [BUG] sed: command "r" wrong behaviour
Date: Thu, 02 Oct 2014 12:27:51 +0200

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-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]