The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
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 05:57 AM
Extracting a column using AWK ronald_brayan Shell Programming and Scripting 2 08-02-2007 05:33 AM
Replace 10th column with a new column--- Terriblly hurry ahmedwaseem2000 Shell Programming and Scripting 2 09-05-2005 10:10 PM
Extracting one column from a ps -ef command m223464 Shell Programming and Scripting 6 04-02-2005 08:36 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-21-2008
Registered User
 

Join Date: Feb 2008
Posts: 1
extracting/copy a column into a new column

Hello,

Anybody out there knows how to copy a column data into a blank column using unix command?

Thanks
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-21-2008
Registered User
 

Join Date: May 2006
Posts: 95
i understand you question as follows:
file1 file2
a b c d ----> a a b c d
a b c d ----> a a b c d
...
solution
awk '{ print $1" "$1" "$2" "$3" "$4 }' <file1 >file2
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:29 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 Global Fact Book

Content Relevant URLs by vBSEO 3.2.0