[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] sed: command "r" wrong behaviour
From: |
Andreas Schwab |
Subject: |
Re: [BUG] sed: command "r" wrong behaviour |
Date: |
Thu, 02 Oct 2014 15:26:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Xose Vazquez Perez <address@hidden> writes:
> - 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"
The r command works like the a command, by *appending* the contents to
the current line, before the *next* line is read.
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."