The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Changing one column of delimited file column to fixed width column manneni prakash Shell Programming and Scripting 2 07-01-2008 12:39 AM
To cut entire column from a file and apend it to another file as another column sakthifire Shell Programming and Scripting 4 06-25-2008 01:27 AM
copy contents of one column in another raman1605 Shell Programming and Scripting 4 05-12-2008 05:58 AM
How to check Null values in a file column by column if columns are Not NULLs Mandab Shell Programming and Scripting 7 03-15-2008 06:57 AM
extracting/copy a column into a new column folashandy UNIX for Advanced & Expert Users 1 02-21-2008 10:24 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-07-2008
Registered User
 

Join Date: Jul 2008
Posts: 2
copy column to another file

Hi guys,

I want to use a quick one liner that can copy an entire column, and add it to a new file as another column. I've tried using cat, but that only appends my column to the bottom of the file.

So now, my first file(file1) looks like this:

1995060101 8
1995060102 6
1995060102 10

and so on, down through 2007123124. I want to take the second column, and add it to a new file(file 2), which currently looks like this:

1995060101 4
1995060102 3
1995060102 15

So in the end, I want file 2 to look like this:

1995060101 4 8
1995060102 3 6
1995060102 15 10

I've tried looking around the forums for help, but most of the copy column info seems to be about replacing current columns with others, not so much appending them.

thanks for any help you guys can offer!
Reply With Quote
Forum Sponsor
  #2  
Old 07-07-2008
Registered User
 

Join Date: Jul 2008
Posts: 2
I'm sorry! I found the cut and paste command about 12 seconds after posting.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:02 PM.


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

Content Relevant URLs by vBSEO 3.2.0