Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7890851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:27:52+00:00 2026-06-03T06:27:52+00:00

I have a list with 8 columns, in which the first 6 are the

  • 0

I have a list with 8 columns, in which the first 6 are the same.

6   99999715    99999771    NM_001013399    0   -   23  0.0714286
6   99999715    99999771    NM_001013399    0   -   24  0.0178571
6   99999715    99999771    NM_001013399    0   -   25  0.1250000

I need to calculate the average for column 7 and column8, as well as $7*$8, and get the format like:

6   99999715    99999771    NM_001013399    0   -   ave($7) ave($8) ave($7*$8)

How should I do this?
thx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:27:53+00:00Added an answer on June 3, 2026 at 6:27 am

    Haven’t tried it, but it should be just:

    {sum7+=$7; sum8+=$8; mul+=$7*$8} END {print sum7/NR,sum8/NR,mul/NR}
    

    In response to popular demand, I’ll add the printf.

    {sum7+=$7; sum8+=$8; mul+=$7*$8}
    END {printf "%s %4i %10.7f %10.7f\n", substr($0,0,49),sum7/NR,sum8/NR,mul/NR}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of matrices, the first matrix of which looks as follows:
I have two LINQ objects which have exactly the same columns and I would
I have a table articles that has a column company which has list of
I have a list of fields/columns that comprises of Sharepoint specific fields/columns, my own
I have a SharePoint list with columns as below: Columns: Title | Description |
I have a unordered list that I want to make fill 2 columns, I
How should I map multiple columns with List in IBATIS ? I have a
i have two columns in my sharepoint list [Cluster Name] and [Host Name] I
I have an excel spreadsheet with two columns, one with a list of exercises
OK So I have a combo box which selects an administrator from a list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.