From 1026aafb258d5af22965791334fd95ec36e41cd0 Mon Sep 17 00:00:00 2001 From: cocker-cc Date: Fri, 19 May 2023 22:55:20 +0200 Subject: [PATCH] Fix Example --- bash-redirections-cheat-sheet.tex | 4 ++-- bash-redirections-cheat-sheet.txt | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bash-redirections-cheat-sheet.tex b/bash-redirections-cheat-sheet.tex index 677a0da..38012ee 100755 --- a/bash-redirections-cheat-sheet.tex +++ b/bash-redirections-cheat-sheet.tex @@ -104,9 +104,9 @@ \hline \verb|cmd <(cmd1)| & Redirect stdout of \verb|cmd1| to an anonymous fifo, then pass the fifo to \verb|cmd| as an argument. Useful when \verb|cmd| doesn't read from stdin directly. \\ \hline -\verb|cmd < <(cmd1)| & Redirect stdout of \verb|cmd1| to an anonymous fifo, then redirect the fifo to stdin of \verb|cmd|. Best example: \verb\diff <(find /path1 | sort) <(find /path2 | sort)\. \\ +\verb|cmd < <(cmd1)| & Redirect stdout of \verb|cmd1| to an anonymous fifo, then redirect the fifo to stdin of \verb|cmd|. \\ \hline -\verb|cmd <(cmd1) <(cmd2) | & Redirect stdout of \verb|cmd1| and \verb|cmd2| to two anonymous fifos, then pass both fifos as arguments to \verb|cmd|. \\ +\verb|cmd <(cmd1) <(cmd2) | & Redirect stdout of \verb|cmd1| and \verb|cmd2| to two anonymous fifos, then pass both fifos as arguments to \verb|cmd|. Best example: \verb\diff <(find /path1 | sort) <(find /path2 | sort)\. \\ \hline \verb/cmd1 >(cmd2)/ & Run \verb|cmd2| with its stdin connected to an anonymous fifo, and pass the filename of the pipe as an argument to \verb|cmd1|. \\ \hline diff --git a/bash-redirections-cheat-sheet.txt b/bash-redirections-cheat-sheet.txt index 002aa55..96c23ba 100755 --- a/bash-redirections-cheat-sheet.txt +++ b/bash-redirections-cheat-sheet.txt @@ -92,12 +92,13 @@ +-----------------------------'---------------------------------------------' | cmd < <(cmd1) | Redirect stdout of `cmd1` to an anonymous | | | fifo, then redirect the fifo to stdin of | -| ____' `cmd`. Best example: | -| | diff <(find /path1 | sort) <(find /path2 | sort) | +| | `cmd`. | +------------------------'----.---------------------------------------------' | cmd <(cmd1) <(cmd2) | Redirect stdout of `cmd1` `cmd2` to two | | | anonymous fifos, then pass both fifos as | | | arguments to \verb|cmd|. | +| ____' Best example: | +| | diff <(find /path1 | sort) <(find /path2 | sort) | +-----------------------------.---------------------------------------------' | cmd1 >(cmd2) | Run `cmd2` with its stdin connected to an | | | anonymous fifo, and pass the filename of |