Skip to content

Files

Latest commit

1d067d7 · Mar 31, 2024

History

History
62 lines (47 loc) · 1.15 KB

README.md

File metadata and controls

62 lines (47 loc) · 1.15 KB

sponge (clone)

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: 標準入力を全て読み取ってから、その内容を引数のファイルに出力します)

Install

Download the binary package from Releases and extract the executable.

Use "go install"

go install github.com/hymkor/sponge@latest

Use "scoop-installer"

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

Usage

sponge {options} {FILENAME(s)...}

  • -b string
    • Postfix for backup of original files
  • -v
    • Output log to the standard error
  • -h
    • Show this help

Release Note(English) Release Note(Japanese)