Hi,
Try this way...
Let us say, your data is in file1 file2 file3 and file4.
--------------------------------------------------------------------------
#!/bin/ksh
rm a1 b1 c1 d1
cat file1 | while read record
do
echo $record | cut -d" " -f1 >> a1
done
cat file2 | while read record
do
echo $record | cut -d" " -f1 >> b1
done
cat file3 | while read record
do
echo $record | cut -d" " -f1 >> c1
done
cat file4 | while read record
do
echo $record | cut -d" " -f1 >> d1
done
paste a1 b1 c1 d1
--------------------------------------------------------------------------
Best Regards,
Sridhar M
Quote:
Originally Posted by ppass
hi all ,
i have three files that contain numbes as the first column .
i want to add these files together so the numbers from the first file is in the first column ; the numbers from the second file in the second column; and the numbers from the third file in the third column .
as an example :
file1 file2 file3
12 23 236
13 234 234
134 233 234
14 237 233
14 2367 232
14 2399 232
file 4
12 23 236
13 234 234
134 233 234
14 237 233
14 2367 332
14 2399 232
thank in advance