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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 files into 1 file 2

Status
Not open for further replies.
Apr 13, 2004
316
US
I have one file which contains:
Resource variable: IBM.PSSP.aixos.pagsp.size
Resource variable: IBM.PSSP.aixos.pagsp.size
Resource variable: IBM.PSSP.aixos.pagsp.%free
Resource variable: IBM.PSSP.aixos.PagSp.totalsize
Resource variable: IBM.PSSP.aixos.PagSp.totalsize
Resource variable: IBM.PSSP.aixos.PagSp.totalfree
Resource variable: IBM.PSSP.aixos.PagSp.totalfree
Resource variable: IBM.PSSP.aixos.PagSp.%totalused
Resource variable: IBM.PSSP.aixos.PagSp.%totalfree
Resource variable: IBM.PSSP.aixos.Mem.Virt.pgspgout
Resource variable: IBM.PSSP.aixos.Mem.Virt.pgspgin
Resource variable: IBM.PSSP.aixos.Mem.Virt.pagexct
Resource variable: IBM.PSSP.aixos.Mem.Virt.pageout
Resource variable: IBM.PSSP.aixos.Mem.Virt.pagein
Resource variable: IBM.PSSP.aixos.Mem.Real.size
Resource variable: IBM.PSSP.aixos.Mem.Real.numfrb
Resource variable: IBM.PSSP.aixos.Mem.Real.%pinned
Resource variable: IBM.PSSP.aixos.Mem.Real.%free
Resource variable: IBM.PSSP.aixos.Mem.Kmem.memuse
Resource variable: IBM.PSSP.aixos.Mem.Kmem.inuse
Resource variable: IBM.PSSP.aixos.Mem.Kmem.failures
Resource variable: IBM.PSSP.aixos.Mem.Kmem.calls
Resource variable: IBM.PSSP.aixos.LAN.xmitovfl
Resource variable: IBM.PSSP.aixos.LAN.xmiterrors
Resource variable: IBM.PSSP.aixos.LAN.xmitdrops
Resource variable: IBM.PSSP.aixos.LAN.recvdrops
Resource variable: IBM.PSSP.aixos.LAN.rcverrors
Resource variable: IBM.PSSP.aixos.FS.%totused
Resource variable: IBM.PSSP.aixos.FS.%nodesused
Resource variable: IBM.PSSP.aixos.Disk.xfer
Resource variable: IBM.PSSP.aixos.Disk.wblk
Resource variable: IBM.PSSP.aixos.Disk.rblk
Resource variable: IBM.PSSP.aixos.Disk.busy
Resource variable: IBM.PSSP.aixos.cpu.wait
Resource variable: IBM.PSSP.aixos.cpu.user
Resource variable: IBM.PSSP.aixos.cpu.kern
Resource variable: IBM.PSSP.aixos.cpu.idle
Resource variable: IBM.PSSP.aixos.CPU.glwait
Resource variable: IBM.PSSP.aixos.CPU.gluser
Resource variable: IBM.PSSP.aixos.CPU.glkern
Resource variable: IBM.PSSP.aixos.CPU.glidle
Resource variable: IBM.PSSP.CSS.recvinit_msw
Resource variable: IBM.PSSP.CSS.recvinit_lsw
Resource variable: IBM.PSSP.CSS.recvinit_dlt
Resource variable: IBM.PSSP.CSS.opackets_msw
Resource variable: IBM.PSSP.CSS.opackets_lsw

and a secon Resource ID: Name=paging01;NodeNum=5
Resource ID: Name=paging01;NodeNum=5
Resource ID: Name=paging01;NodeNum=5
Resource ID: NodeNum=*
Resource ID: NodeNum=*
Resource ID: NodeNum=*
Resource ID: NodeNum=*
Resource ID: NodeNum=5
Resource ID: NodeNum=5
Resource ID: NodeNum=5
Resource ID: NodeNum=5
Resource ID: NodeNum=5
Resource ID: NodeNum=5
Resource ID: NodeNum=5
Resource ID: NodeNum=*
Resource ID: NodeNum=7
Resource ID: NodeNum=7
Resource ID: NodeNum=7
Resource ID: NodeNum=*;Type=*
Resource ID: NodeNum=3;Type=socket
Resource ID: NodeNum=8;Type=protcb
Resource ID: NodeNum=10;Type=mbuf
Resource ID: Adapter=ent0;NodeNum=5
Resource ID: Adapter=ent0;NodeNum=5
Resource ID: Adapter=ent0;NodeNum=5
Resource ID: Adapter=ent0;NodeNum=5
Resource ID: Adapter=ent0;NodeNum=5
Resource ID: VG=rootvg;NodeNum=5
Resource ID: VG=rootvg;LV=hd3;NodeNum=*
Resource ID: VG=rootvg;LV=hd3;NodeNum=3
Resource ID: Name=hdisk1;NodeNum=5
Resource ID: Name=hdisk1;NodeNum=5
Resource ID: Name=hdisk1;NodeNum=5
Resource ID: Name=hdisk1;NodeNum=5
Resource ID: CPU=*;NodeNum=5
Resource ID: CPU=*;NodeNum=5
Resource ID: CPU=*;NodeNum=5
Resource ID: CPU=*;NodeNum=5
Resource ID: NodeNum=7
Resource ID: NodeNum=7
Resource ID: NodeNum=7
Resource ID: NodeNum=7
Resource ID: NodeNum=5
Resource ID: NodeNum=5
Resource ID: NodeNum=5

What I need is for one file to contain:
Resource variable: IBM.PSSP.aixos.pagsp.size Resource ID: Name=paging01;NodeNum=5


So append line 1 from file 2 to the end of line 1 in file 1 and so on.

Thanks.
 
Try something like this:
pr -m -t -s" " file1 file2

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
screwloose,

I believe the paste command would suite your needs as well.

paste file1 file2

or

paste file1 file2 > newfile

John
 
Yes, paste did work. For some reason I negelected it. Thanks.
 
ramu74, cat file1 file2 will do a serial merge, screwloose wanted a parallel merge.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top