alternative for pipe operator (heredoc)

From thelinuxwiki
Revision as of 01:01, 2 November 2022 by Nighthawk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The equivalent of

command1 | command2 is command2 < <(command1)

This can be extended to three (or more) commands too.

command3 < <(command2 < <(command1))

taken from https://askubuntu.com/questions/564380/alternative-for-pipe-operator

Bash HereDoc Tutorial With Examples