From 00d427c73a536dc29de20415743a1084b47413ce Mon Sep 17 00:00:00 2001 From: Karl Ostmo Date: Sat, 15 Sep 2012 19:10:27 -0700 Subject: [PATCH] Moved anonymous file descriptor example --- bash-redirections-cheat-sheet.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bash-redirections-cheat-sheet.tex b/bash-redirections-cheat-sheet.tex index 677a0da..e9e5d2a 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