commands.sh

sponge

all

Soak up the input before writing the output file.

More info →

Options (1)

-v, --invert-matchboolean

Remove all lines starting with # in a file

Example: grep {{[-v|--invert-match]}} '^{{#}}' {{path/to/file}} | sponge {{path/to/file}}

Examples (2)

Append file content to the source file

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

Remove all lines starting with # in a file

grep [-v|--invert-match] '^#' path/to/file | sponge path/to/file
made by @shridhargupta | data from tldr-pages