2015-02-08 16:17:21 -05:00
|
|
|
.Dd February 8, 2015
|
2015-01-31 08:20:02 -05:00
|
|
|
.Dt SPONGE 1
|
2015-01-31 14:37:03 -05:00
|
|
|
.Os sbase
|
2015-01-30 18:16:25 -05:00
|
|
|
.Sh NAME
|
|
|
|
.Nm sponge
|
|
|
|
.Nd soak up standard input and write to a file
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Ar file
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2013-07-02 13:26:24 -04:00
|
|
|
reads stdin completely, then writes the saved contents to
|
2015-01-30 18:16:25 -05:00
|
|
|
.Ar file .
|
2013-07-02 13:26:24 -04:00
|
|
|
This makes it possible to easily create pipes which read from and write to
|
|
|
|
the same file.
|
2015-01-30 18:16:25 -05:00
|
|
|
.Pp
|
2015-02-08 16:17:21 -05:00
|
|
|
If
|
2015-02-01 14:52:28 -05:00
|
|
|
.Ar file
|
2015-02-08 16:17:21 -05:00
|
|
|
is a symbolic link, it writes to its destination instead.
|