soak up standard input and write to a file. (original version, my Rust version)
$ cat foo.txt
a
b
c
d
$ cat -n foo.txt | sponge foo.txt
$ cat foo.txt
1 a
2 b
3 c
4 d
(Japanese: 標準入力を全て読み取ってから、その内容を引数のファイルに出力します)
Download the binary package from Releases and extract the executable.
go install github.com/hymkor/sponge@latest
scoop install https://raw.githubusercontent.com/hymkor/sponge/master/sponge.json
or
scoop bucket add hymkor https://github.com/hymkor/scoop-bucket
scoop install sponge
sponge {options} {FILENAME(s)...}
-b string
- Postfix for backup of original files
-v
- Output log to the standard error
-h
- Show this help