Append file content to the source file

sponge

cat {{path/to/file}} | sponge -a {{path/to/file}}

click the source code to copy install sponge on any operating system with command-not-found.com