Command-line tool
sponge
brew/sponge
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Soak up standard input and write to a file
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
winget install --id xdpxi.sponge -e
macOS
brew install sponge
Linux
brew install sponge
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 '^#' path/to/file | sponge path/to/file
Related command-line tools
- o-o
Enables commands that assume the standard input and output to read and write to files specified in the command line. - aki-xtee
copy standard input to each files and standard output. - ffe
Parse flat file structures and print them in different formats - moreutils
Collection of tools that nobody wrote when UNIX was young - uu_tty
tty ~ (uutils) display the name of the terminal connected to standard input - autoconf
Automatic configure script builder - standard
JavaScript Style Guide, with linter & automatic code fixer - buildifier
Format bazel BUILD files with a standard convention
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents