bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grouped pipeline clobbering question


From: Phillip Susi
Subject: Grouped pipeline clobbering question
Date: Mon, 20 Mar 2006 11:52:50 -0500
User-agent: Thunderbird 1.5 (Windows/20051201)

I'm a bit confused by the results I'm seeing with a pipeline to a group. I was trying to parse a text file in such a way as the first n lines are passed straight through, and then a sed script is applied to the rest. I thought I could do that with something like this:

cat file | ( head --lines=1 ; sed -e xxxxx )

I thought that head should consume the first line from the pipe, leaving the rest queued for sed to consume, but this does not seem to be the case. It appears that the pipe either does not make it to sed or is empty when it does. What am I doing wrong?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]