Mike2011
Programmer
- May 26, 2011
- 2
Hi guys,
I'd recently the problem to include the header row in my result set.
This is my awk command:
bzcat .....txt.bz2 |awk '{if($1=="2011-05-17"&&$3=="2342"&&$6=="2452"){print $1,$3,$6}}'
I've tried the following:
1. bzcat .....txt.bz2 |awk '{if($1=="2011-05-17"&&$3=="2342"&&$6=="2452"){print $1,$3,$6}}' | head -0
2. bzcat .....txt.bz2 | head -0 | awk '{if($1=="2011-05-17"&&$3=="2342"&&$6=="2452"){print $1,$3,$6}}'
Both approaches didn't work. Any ideas what I'm doing wrong?
Much appreciate,
Mike
I'd recently the problem to include the header row in my result set.
This is my awk command:
bzcat .....txt.bz2 |awk '{if($1=="2011-05-17"&&$3=="2342"&&$6=="2452"){print $1,$3,$6}}'
I've tried the following:
1. bzcat .....txt.bz2 |awk '{if($1=="2011-05-17"&&$3=="2342"&&$6=="2452"){print $1,$3,$6}}' | head -0
2. bzcat .....txt.bz2 | head -0 | awk '{if($1=="2011-05-17"&&$3=="2342"&&$6=="2452"){print $1,$3,$6}}'
Both approaches didn't work. Any ideas what I'm doing wrong?
Much appreciate,
Mike