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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
appending a file using sed in ksh smac Shell Programming and Scripting 3 01-02-2008 12:09 PM
appending to sed output of one file into the middle of file go4desperado Shell Programming and Scripting 5 02-04-2007 10:20 PM
Reading specific contents from a file and appending it to another file dnicky Shell Programming and Scripting 5 10-04-2005 02:45 AM
appending a file chumba UNIX for Dummies Questions & Answers 1 05-24-2001 08:09 AM
Appending out to a file Astudent UNIX for Dummies Questions & Answers 1 10-19-2000 11:17 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-25-2002
Registered User
 

Join Date: Oct 2001
Location: Mexico City
Posts: 1
Stumble this Post!
Question Appending columns on a file

My issue is the following:

I have several text files, let's say 10 of them. Each one has three columns separated by a tab: Date, Time and Value. What I want to do next is to have only one text file containing the information: Date, Time, Value1, Value2, Value3, ... , Value10, where Value1 corresponds to column Value of the first text file, Value2 corresponds to column Value of the second text file and so on.

Could anybody give some clues or tell me how could I do what I want?

Thank you very much.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-25-2002
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Stumble this Post!
The join command should be able to do this.

Read the man page on join.
Reply With Quote
  #3 (permalink)  
Old 09-27-2002
Registered User
 

Join Date: Jul 2002
Posts: 25
Stumble this Post!
awk {'print $3'} <file>|tr '\n' ' ' > res

edit res and add date and time in the beginning

CHEERS
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:24 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0