[cs631apue] Question about pipeline 3
Jan Schaumann
jschauma at stevens.edu
Fri Dec 12 09:36:44 EST 2014
zding4 <zding4 at stevens.edu> wrote:
> How to handle the situation if the right hand side of the pipe doesn't
> have cmd.
> like:
> $ ls -l |
What would be least surprising to you as the user?
What do other shells do?
Most shells support command-lines spanning multiple lines, so they are
likely to present you with a prompt and wait for more input. Your shell
doesn't (need to) support this, so emulate by providing EOF via Ctrl+D
after the new line:
$ ls -l |
>
^--- Ctrl+D here
-Jan
More information about the cs631apue
mailing list