aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/moreutils/files/mispipe.1
blob: 375994b3fe4d224ac871d6914c1c3de062ba692e (plain) (blame)
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
'\" t
.\"     Title: mispipe
.\"    Author: Nathanael Nerode
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 2006-09-07
.\"    Manual: moreutils
.\"    Source: moreutils
.\"  Language: English
.\"
.TH "MISPIPE" "1" "2006\-09\-07" "moreutils" "moreutils"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mispipe \- pipe two commands, returning the exit status of the first
.SH "SYNOPSIS"
.HP \w'\fBmispipe\fR\ 'u
\fBmispipe\fR [\fI"command1"\fR] [\fI"command2"\fR]
.SH "DESCRIPTION"
.PP
\fBmispipe\fR
pipes two commands together like the shell does, but unlike piping in the shell, which returns the exit status of the last command; when using mispipe, the exit status of the first command is returned\&.
.PP
Note that some shells, notably
\fBbash\fR, do offer a pipefail option, however, that option does not behave the same since it makes a failure of any command in the pipeline be returned, not just the exit status of the first\&.
.SH "EXIT STATUS"
.PP
The exit status of the first command\&. If the process terminated abnormally (due to a signal), 128 will be added to its exit status\&.
.SH "AUTHOR"
.PP
Nathanael Nerode