Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 05 Jun 2010 14:02:16 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Bakul Shah <bakul@bitblocks.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: head behaviour
Message-ID:  <4C0ABB58.6030009@FreeBSD.org>
In-Reply-To: <20100605204845.6E56B5B52@mail.bitblocks.com>
References:  <20100605201242.C79345B52@mail.bitblocks.com>	<4C0AB448.2040104@FreeBSD.org> <20100605204845.6E56B5B52@mail.bitblocks.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06/05/10 13:48, Bakul Shah wrote:
> Without running the following can you guess its output?
>
> $ look '' | (head -2; head -2)

Again, it's not clear to me what you expect is going to happen with the 
second 'head -2' there. I agree that the actual output of your example 
is wacky and unexpected, but what I'm trying to get you say is what YOU 
think should happen. The examples that you pasted in your previous post 
did not and could not do what you said you wanted them to do, so I don't 
quite understand what the bug is.

Put more simply, if you generate wacky command lines you should not be 
surprised when they produce wacky results. :)


Doug


On two occasions I have been asked [by members of Parliament!], "Pray, 
Mr. Babbage, if you put into the machine wrong figures, will the right 
answers come out?"  I am not able rightly to apprehend the kind of 
confusion of ideas that could provoke such a question.
		-- Charles Babbage

-- 

	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C0ABB58.6030009>