Subject: bug#74577: bug-about-sed

From: "820648178" <[email-masked]>
Date: Thu, 28 Nov 2024 15:06:54 +0800

&nbsp; When using the command&nbsp;sed -i "$a\anon" /opt/passwd&nbsp;to add content to an empty file, the content addition fails. I found that the&nbsp;sed&nbsp;command requires the file to have at least one line, even if it's a blank line, in order to execute. I consider this a bug. Can it be fixed?