-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsoak.1
64 lines (64 loc) · 1.39 KB
/
soak.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.\" SPDX-License-Identifier: MIT
.\" SPDX-FileCopyrightText: 2023 Bradley Jones <[email protected]
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.nh
.ad l
.TH "SOAK" "1" "2023-07-04"
.PP
.SH NAME
.PP
soak - soak up standard input and write it to a file
.PP
.SH SYNOPSIS
.PP
\fBsoak\fR [-h] [-v] [-a \fIfile\fR] | [\fIfile\fR]
.PP
sed '\&.\&.\&.\&'\& \fIfile\fR | grep '\&.\&.\&.\&'\& | \fBsoak\fR [-a] \fIfile\fR
.PP
.SH DESCRIPTION
.PP
\fBsoak\fR reads and writes standard input to the specified \fIfile\fR.\&
Unlike a shell redirect, \fBsoak\fR soaks up all its input before writing
the output file.\& This allows constructing pipelines that read from and
write to the same \fIfile\fR.\&
.PP
\fBsoak\fR preserves the permissions of \fIfile\fR if already extant.\&
.PP
If \fIfile\fR is not specified, \fBsoak\fR outputs to stdout.\&
.PP
.SH OPTIONS
.PP
\fB-h\fR
.RS 4
Show help information
.PP
.RE
\fB-v\fR
.RS 4
Show version information
.PP
.RE
\fB-a\fR \fIfile\fR
.RS 4
Append the standard input to \fIfile\fR.\& If the file does not
exist, a new file is created in-place.\& In this case, \fBsoak\fR
behaves as if called without \fB-a\fR.\&
.PP
.RE
.SH EXIT STATUS
.PP
0 success
.PP
1 failure
.PP
.PP
.SH SEE ALSO
.PP
\fBcat\fR(1), \fBsponge\fR(1), \fBtee\fR(1)
.PP
.SH AUTHOR
.PP
\fBsoak\fR was written by Bradley Jones <brdjns@gmx.\&us>, and is a C
.br
implementation of \fBsponge\fR by Colin Watson and Tollef Fog Heen.\&