LinuxCommandLibrary

mispipe

pipes two commands but returns the exit status of the first command instead of

TLDR

Run pipeline returning first command exit status

$ mispipe "[command1]" "[command2]"
copy
Use in shell pipeline
$ mispipe "cat /nonexistent" "head -n 5"; echo $?
copy

SYNOPSIS

mispipe command1 command2

DESCRIPTION

mispipe pipes two commands but returns the exit status of the first command instead of the last. Unlike regular shell pipes that return the final command's exit status. Part of moreutils collection.

PARAMETERS

command1

First command (source).
command2
Second command (sink).

SEE ALSO

pee(1), sponge(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community