LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mispipe

pipes two commands and returns the exit status of the first command

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).

INSTALL

sudo apt install moreutils
copy
sudo dnf install moreutils
copy
sudo pacman -S moreutils
copy
sudo apk add moreutils
copy
sudo zypper install moreutils
copy
brew install moreutils
copy
nix profile install nixpkgs#moreutils
copy

SEE ALSO

pee(1), sponge(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid