[HPADM] SUMMARY Join 2 File

From: Lal, Neeraj (Neeraj.Lal@Pfizer.com)
Date: Wed Jul 03 2002 - 10:35:41 EDT


Hi Admins

Thanks to all who replied most of the people had suggested paste command

paste -d'\0' file1 file2 >newfile Bill Thompson & Brad Barton,
paste -d "" file1 file2 Bala S & Richard Wright
paste -d"\0" file1 file2 Sohr James

Perl Script by Harm Ensing
$I=0;
open(IN,"file1");
while(<IN>){
chop;
$A{$I++}=$_;
}
$I=0;
open(IN,"file2");
while(<IN>){
chop;
$B{$I++}=$_;
}
close(IN);
foreach $key (keys %A) {
print $A{$key}.$B{$key}."\n";
}

Ist response By Angelo Collazo I tried this one and it worked for me (new
command for me)

pr -m -w## -t file1 file2
t is to exclude headers and trailers
w is for width, ## is the linesize and can be changed
m is for merge

Thanks to all others who pointed me to man paste.

Neeraj Lal

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:15 EDT