Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Example #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bash-redirections-cheat-sheet.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions bash-redirections-cheat-sheet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down