Subject: Fwd: sed leaving temporary files behind

From: Paul Eggert <[email-masked]>
Date: Tue, 22 Feb 2022 09:17:12 -0800

Forwarding this from bug-gnu-utils.

Subject: sed leaving temporary files behind
From: da via Bug reports for the GNU utilities <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Tue, 22 Feb 2022 09:29:52 +0000 (UTC)
List-Id: Bug reports for the GNU utilities <bug-gnu-utils.gnu.org>

Hi,I'm using gnu win32 ver 4.2.1 of sed.When using -i option, sed always leaves behind temporary files named sed* in the directory where it's being called. (ie. NOT in the directory where the edited file resides.)Each successful run leaves 1 temp file behind.
When I supply a file extension using -itmp, the expected file backup gets created in the directory where the edited file resides. The temporary files are still left over in the execution directory.
>dir sed*
 Directory of C:\GitHub\merlin-etl\merlinDBScripts\dbChanges\sql\prod
File Not Found
>sed -i "s/ad/asdf/" \temp\1.csv
>dir sed*
 Directory of C:\GitHub\merlin-etl\merlinDBScripts\dbChanges\sql\prod
22. 02. 2022  10:28                47 sedhJDLA6               1 File(s)             47 bytes               0 Dir(s)  173 949 931 520 bytes free

Thank you,Daniel Adam