sponge

Soak up the input before writing the output file.

TLDR

Append file content to the source file

$ cat [path/to/file] | sponge -a [path/to/file]
copy

Remove all lines starting with # in a file

$ grep -v '^[#]' [path/to/file] | sponge [path/to/file]
copy

Copied to clipboard
free 100$ digital ocean credit