LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sed and awk command (https://www.linuxquestions.org/questions/linux-newbie-8/sed-and-awk-command-699644/)

hot bird 01-24-2009 02:46 PM

sed and awk command
 
Hi all

I have file formatting as this
name is D1
tall is ...
weight is ...
hair long is ...

n1 n2 n3 n4
.. .. .. ..
.. .. .. ..
.. .. .. ..
.. .. .. ..


name is D2
tall is ...
weight is ...
hair long is ...

n1 n2 n3 n4
.. .. .. ..
.. .. .. ..
.. .. .. ..
.. .. .. ..

and same data for person D3, D4, ..
It is a huge file. I want to use sed and awk command to print only the numbers of n3 and tall and put them in coloumns, the numbers of n3 must be in the first column. Pleeeeeeeeeeeeeese don't view it without help me.
Thanks alot

Tinkster 01-25-2009 11:19 AM

Welcome to LQ,

And is this a homework question? The data looks a
bit fabricated ...


Cheers,
Tink

pixellany 01-25-2009 11:26 AM

Please post a sample of the actual file contents, and a sample of what you want the output to look like.

Also post what solutions you have already tried, and what the issues are.

Finally, does the assignment tell you specifically to use SED and AWK?

pixellany 01-26-2009 10:58 AM

No answer from OP means that this was likely homework.......closed.

hot_bird; If I'm wrong, send private e-mail and I'll do the right thing.


All times are GMT -5. The time now is 08:01 PM.