GNU bug report logs -
#63813
sed bug
Previous Next
To reply to this bug, email your comments to 63813 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-sed <at> gnu.org
:
bug#63813
; Package
sed
.
(Wed, 31 May 2023 13:25:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
yu cuilu <yucuilu <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-sed <at> gnu.org
.
(Wed, 31 May 2023 13:25:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
missing version:
sed (GNU sed) 4.2.2
case 1: fail
rm -f ./resolv.conf;
touch ./resolv.conf; sed -i 'a nameserver 8.8.8.8' ./resolv.conf ; cat
resolv.conf
case 2: ok
rm -f ./resolv.conf;
echo a > ./resolv.conf; sed -i 'a nameserver 8.8.8.8' ./resolv.conf ; cat
resolv.conf
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-sed <at> gnu.org
:
bug#63813
; Package
sed
.
(Wed, 31 May 2023 20:02:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
On Wed, 31 May 2023 14:58:12 +0800, yu cuilu <yucuilu <at> gmail.com> wrote:
> missing version:
> sed (GNU sed) 4.2.2
>
> case 1: fail
>
> rm -f ./resolv.conf;
> touch ./resolv.conf; sed -i 'a nameserver 8.8.8.8' ./resolv.conf ; cat
> resolv.conf
>
> case 2: ok
>
> rm -f ./resolv.conf;
> echo a > ./resolv.conf; sed -i 'a nameserver 8.8.8.8' ./resolv.conf ; cat
> resolv.conf
This is all behaving as expected. The description for the "a" command says:
Appending text after a line
In the first example, there are no lines at all in the input, so sed has no
chance to append text after reading a line.
In the second example, the input consists of one line, after which sed can
append the specified text.
--
D.
This bug report was last modified 1 year and 177 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.