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
How to remove columns with specific string? AMBER UNIX for Dummies Questions & Answers 2 03-31-2009 03:18 PM
Grep based on specific columns. deepakwins Shell Programming and Scripting 1 03-26-2009 06:23 PM
Displaying specific columns in a file logorob UNIX for Dummies Questions & Answers 1 02-25-2009 01:03 AM
Replace specific columns jisha Shell Programming and Scripting 2 10-13-2008 10:34 AM
Deleting specific columns from a file premar Shell Programming and Scripting 11 02-14-2006 07:02 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-28-2009
repinementer repinementer is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 158
Mean of the specific columns

I have a input file that has some common values in 1st,2nd and 3rd columns. 4th and 5th are different. Now I would like to print the mean of the fourth column of similar values in 1st.2nd and 3rd columns along with all the values in 5th column.

input

Code:
NM_0    1.22    CR5    0.4    n_21663
NM_0    1.22    CR5    0.1    n_1664
NM_0    1.22    CR5    0.6    n_21665
NM_11    1.36    AK09   0.9    n_19168
NM_11    1.36    AK09    -0.02    n_19169

output

Code:
NM_0    1.22    CR5    0.366  n_21663  n_1664  n_21665  
NM_11    1.36    AK09   0.44  n_19168  n_19169

Thanx in advance
 

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 08:18 AM.


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