The UNIX and Linux Forums  

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perl, printing a string into columns doubleminus UNIX for Dummies Questions & Answers 5 05-21-2008 10:41 PM
append a string to a grep result melanie_pfefer Shell Programming and Scripting 8 03-19-2008 07:19 AM
perl: simple question on string append the_learner Shell Programming and Scripting 1 05-14-2007 06:09 PM
Append string in all rows Rock Shell Programming and Scripting 7 12-01-2006 02:46 AM
append esc string beilstwh Shell Programming and Scripting 2 05-11-2005 02:33 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #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
  #2 (permalink)  
Old 04-28-2008
Shivdatta Shivdatta is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 73
Refer man paste...
  #3 (permalink)  
Old 04-28-2008
karthikn7974's Avatar
karthikn7974 karthikn7974 is offline VIP Member  
Supporter
  
 

Join Date: Jul 2007
Location: Singapore
Posts: 58
thanks to all

solved with the below simple arguments

paste file1 file2 > file2
  #4 (permalink)  
Old 04-28-2008
karthikn7974's Avatar
karthikn7974 karthikn7974 is offline VIP Member  
Supporter
  
 

Join Date: Jul 2007
Location: Singapore
Posts: 58
sorry typo mistake

paste file1 file2 > file3
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:28 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0