PIPELINE(1)

πŸ“¦ version 2.9.9.2, in nixpkgs unstable

πŸ’– PIPELINE(1) β€” pipeline from the General Commands Manual πŸ’–

okay bestie, this is the pipeline(1) page, and it’s about connecting two commands with a pipe. very plumbing, very slay. 🫢


🌸 NAME 🌸

pipeline β€” run two commands with a pipe between them πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

In an execlineb(1) script:

pipeline [-d] [-r | -w] { prog1... } prog2...

✨ DESCRIPTION ✨

okay so pipeline reads prog1... inside a block (cf. execline-block(7)) and unquotes it. then it runs prog1... as a child process and exec(3)s into prog2..., with a pipe between prog1's stdout and prog2's stdin. literally the classic pipe setup, but make it execline. πŸ’–

The pid of prog1 is available inside prog2... as the ! environment variable. yes, the whole entire exclamation mark. iconic. ‼️

You can easily create a chain of pipes, bestie. this:

execlineb -Pc 'pipeline { a } pipeline { b } c'

is roughly equivalent to this:

sh -c 'exec a | b | c'

except that shells usually run c as a child process like a and b, and exec has no effect. no cap. 🐚


πŸ’… OPTIONS πŸ’…

  • -d β€” Run prog1... as a grandchild of pipeline. This is meant to prevent a zombie from hanging around if prog2... fails to wait for its children. spooky zombie prevention, but make it UNIX. 🧟
  • -r β€” Make prog1... the writer and prog2... the reader. This is the default. default behavior ate, honestly. ✨
  • -w β€” Make prog1... the reader and prog2... the writer. flip it, reverse it, periodt. πŸ”„

πŸ¦‹ SEE ALSO πŸ¦‹

background(1), backtick(1), execlineb(1), foreground(1), if(1), ifelse(1), ifte(1), ifthenelse(1), runblock(1), exec(3), execline-block(7)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/pipeline.html β€” go read the source, bestie, it’s giving official. 🌈


πŸ‘‘ AUTHORS πŸ‘‘

Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)


source/version: Debian; date: February 14, 2021 β€” that’s the whole footer vibe, mwah bestie πŸ’‹βœ¨

πŸ“¦ where this page comes from