The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-28-2008
karthikn7974's Avatar
karthikn7974 karthikn7974 is offline VIP Member  
Supporter
  
 

Join Date: Jul 2007
Location: Singapore
Posts: 58
Append string to columns from 2 files

Hi

Having a file as follows
file1.txt
Code:
Date (dd/mm)Time      Server        IP                       Error Code
===========================================================================
10/04/2008   10:10     ServerA    xxx.xxx.xxx.xxx             6	
10/04/2008   10:10     ServerB    xxx.xxx.xxx.xxx             9	
10/04/2008   10:10     ServerC    xxx.xxx.xxx.xxx             16	
10/04/2008   10:10     ServerD    xxx.xxx.xxx.xxx             60
File2.txt
Code:
  Status 
=============
Solved
Pending
Outage
Process
Need to update file1.txt as below
Code:
Date (dd/mm)Time      Server        IP                       Error Code            Status
================================================================================================================
10/04/2008   10:10     ServerA    xxx.xxx.xxx.xxx             6	            Solved
10/04/2008   10:10     ServerB    xxx.xxx.xxx.xxx             9	            Pending
10/04/2008   10:10     ServerC    xxx.xxx.xxx.xxx             16	     Outage
10/04/2008   10:10     ServerD    xxx.xxx.xxx.xxx             60             Process
is there anyway to append columns using awk or sed

thanks in advance