GNU bug report logs - #74578
sed-bug

Previous Next

Package: sed;

Reported by: wu <wcg226043 <at> 126.com>

Date: Thu, 28 Nov 2024 07:33:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: wu <wcg226043 <at> 126.com>
To: 74578 <at> debbugs.gnu.org
Subject: bug#74578: sed-bug
Date: Thu, 28 Nov 2024 15:18:08 +0800 (CST)
[Message part 1 (text/plain, inline)]
[root <at> localhost ~]# cat demo.txt 

[root <at> localhost ~]# sed -i '$a \test_fields\ntest_fields1' demo.txt

[root <at> localhost ~]# cat demo.txt 

[root <at> localhost ~]# echo "" >> demo.txt 

[root <at> localhost ~]# sed -i '$a \test_fields\ntest_fields1' demo.txt

[root <at> localhost ~]# cat demo.txt 

est_fields

test_fields1

[root <at> localhost ~]# 


There must be one line of content in the file, even if it is an empty line, content can be added
Cannot add content to an empty file using the sed command



[Message part 2 (text/html, inline)]
[image.png (image/png, inline)]

This bug report was last modified 198 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.