On 2/12/2008 7:08 AM, Minalba Jordao wrote:
[please don't top-post, fixed below]
> On 12 fev, 10:57, Minalba Jordao <minalbajor...@[EMAIL PROTECTED]
> wrote:
>
>>Hello!
>>
>>I am a newbie.
>>
>>I have a few problems.
>>
>>I have a file that looks like:
>>"
>>! comments
>>! comments
>>! comments
>>
>>@[EMAIL PROTECTED]
text
>>X
>>Y
>>Z
>>@[EMAIL PROTECTED]
>>
>>column1 column2 column3 column4
>>column1 column2 column3 column4
>>... ... ...
>>... ... ...
>>column1 column2 column3 column4
>>column1 column2 column3 column4
>>"
>>
>>My questions:
>>I would to get the
>>- "! coments"
>>- what is between the @[EMAIL PROTECTED]
(at sign).
>>and
>>column1 column2 -column3
>>for each line..
>>
>>could anyone help me?
>>
>>Mina
>
> Including the @[EMAIL PROTECTED]
(at sign) and what is in between.
>
This MAY be what you want, but it's not clear:
awk '
/^@[EMAIL PROTECTED]
{ print; a=!a; b=1; next }
a || /^!/ { print; next }
b { print $1,$2,$3 }
' file
If not, post some sample input and expected output.
Ed.


|