Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Awk records mnipulation

Status
Not open for further replies.

santhas

Technical User
Aug 27, 2003
35
AU
Dear Gurus,

I have an output like this:

fcp 1
aaaaaaaaaaaa
bbbbbbbbbbbb
1:2:3:4
dddddddd

fcp 2
vvvvvvvvvvvvvv
2:4:0:5:9:9
ccccccccccccccc
bbbbbbbbbbbbbbb

I want to print line 2 and line 3 next to each other
ex: bbbbbbbbbbbb 1:2:3:4

How could I do this?

Thanks again
 
Hi

For your sample data ( which not fully match your words ) :
Code:
awk 'NR==3{printf"%s\t",$0;next}1' /input/file
If you do not like the result, give us more information.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top