[comp.os.minix] What does this do?

jeff@questar.QUESTAR.MN.ORG (Jeff Holmes) (01/16/89)

	My 7 month old daughter was pounding on my keyboard while
	minix (1.2) was up and running (doing some complex statistical
	analysis of the system no doubt :-) and she happened to hit this
	sequence of keys:

		z!| <return>

	and my secondary prompt appeared. Everything seemed to remain
	the same system-wise except for the prompt.

	Does this key sequence have any meaning or is it just a fluke?

	Thanks
	-jeff-
-- 
Jeff Holmes	                  DOMAIN: jeff@questar.mn.org 
Questar Data Systems                UUCP: amdahl!bungia!questar!jeff

ast@cs.vu.nl (Andy Tanenbaum) (01/17/89)

In article <2074@questar.QUESTAR.MN.ORG> jeff@questar.QUESTAR.MN.ORG (Jeff Holmes) writes:
>
>	My 7 month old daughter was pounding on my keyboard
>	and she happened to hit
>		z!| <return>
>	and my secondary prompt appeared. 

I am not sure what is going on, but my Sun 3/60 does the same thing.

Andy Tanenbaum (ast@cs.vu.nl)

sater@cs.vu.nl (Hans van Staveren) (01/17/89)

In article <1914@ast.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes:
>In article <2074@questar.QUESTAR.MN.ORG> jeff@questar.QUESTAR.MN.ORG (Jeff Holmes) writes:
>>
>>	My 7 month old daughter was pounding on my keyboard
>>	and she happened to hit
>>		z!| <return>
>>	and my secondary prompt appeared. 
>
>I am not sure what is going on, but my Sun 3/60 does the same thing.
>
>Andy Tanenbaum (ast@cs.vu.nl)
>

As no doubt hundreds of people will say this is the normal behaviour
for a Bourne shell, or truthfull copy thereof.
The | sign creates a pipe, and since there is no command after it
the shell knows the command is not finished yet and gives the secondary
prompt.

Anybody that cannot outwit his seven month old daughter should quickly
start to read the manuals, or the code. :-)


			Hans van Staveren
			Vrije Universiteit
			Amsterdam, Holland

br@laura.UUCP (Bodo Rueskamp) (01/18/89)

In article <1914@ast.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes:
#In article <2074@questar.QUESTAR.MN.ORG> jeff@questar.QUESTAR.MN.ORG (Jeff Holmes) writes:
##
##	My 7 month old daughter was pounding on my keyboard
##	and she happened to hit
##		z!| <return>
##	and my secondary prompt appeared. 
#
#I am not sure what is going on, but my Sun 3/60 does the same thing.
#
#Andy Tanenbaum (ast@cs.vu.nl)

'z!' is a command, '|' is the pipe char.
sh then waits for another input line to complete the pipeline.

--
Bodo Rueskamp
br@unido.uucp

DEDOUREK%UNB.CA@CORNELLC.CIT.CORNELL.EDU (01/18/89)

> >		z!| <return>
Of course, this ends with a pipe symbol.  The shell will
prompt for the rest of the pipe-line.  This allows typing
    ls  | pr
as
     ls |
      pr
A perhaps little known fact is that the shell recognizes
the pipe symbol without requiring surrounding blanks, thus
     ls|pr
is
     ls | pr
Or have I missed something?

pmb@donk.UUCP (pmb) (01/19/89)

In article <1914@ast.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes:
>In article <2074@questar.QUESTAR.MN.ORG> jeff@questar.QUESTAR.MN.ORG (Jeff Holmes) writes:

>>	My 7 month old daughter was pounding on my keyboard
>>	and she happened to hit
>>		z!| <return>
>>	and my secondary prompt appeared. 

>I am not sure what is going on, but my Sun 3/60 does the same thing.

My guess would be that the pipe symbol at the end is implying that the
command is incomplete, so the system is waiting for the rest.

I just checked the behavior on my (Xenix) machine.  In sh, if I type a command
immediately followed by a pipe symbol, it waits for more input.  If I put a 
space before the pipe, it just does the command.

In csh, it gives me "Invalid null command" either way.

bitbug@vicom.COM (James Buster) (01/19/89)

In article <1914@ast.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes:
>In article <2074@questar.QUESTAR.MN.ORG> jeff@questar.QUESTAR.MN.ORG (Jeff Holmes) writes:
>>
>>	My 7 month old daughter was pounding on my keyboard
>>	and she happened to hit
>>		z!| <return>
>>	and my secondary prompt appeared. 
>
>I am not sure what is going on, but my Sun 3/60 does the same thing.
>
>Andy Tanenbaum (ast@cs.vu.nl)

What you are doing is piping the output of the "z!" command to a
null or unspecified command. /bin/sh is prompting you for the name
of the command to receive the piped data.

--------------------------------------------
	     James Buster
	Mad Hacker Extraordinaire
    	...!ames!vsi1!bitbug
	   bitbug@vicom.com
--------------------------------------------