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 337625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:21:12+00:00 2026-05-12T10:21:12+00:00

# To fix the symptom How can you sum up the following columns effectively?

  • 0

# To fix the symptom

How can you sum up the following columns effectively?

Column 1

1
3
3
...   

Column 2

2323
343
232
...

This should give me

Expected result

2324
346
235
...

I have the columns in two files.


# Initial situation

I use sometimes too many curly brackets such that I have used one more this { than this } in my files.
I am trying to find where I have used the one unnecessary curly bracket.
I have used the following steps in getting the data

Find commands

 find . * -exec grep '{' {} + > /tmp/1
 find . * -exec grep '}' {} + > /tmp/2

AWK commands

 awk -F: '{ print $2 }' /tmp/1 > /tmp/11
 awk -F: '{ print $2 }' /tmp/2 > /tmp/22

The column are in the files /tmp/11 and /tmp/22.

I repeat a lot of similar commands in my procedure.
This suggests me that this is not the right way.

Please, suggests me any way such as Python, Perl or any Unix tool which can decrease the number of steps.

  • 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-05-12T10:21:12+00:00Added an answer on May 12, 2026 at 10:21 am

    If c1 and c2 are youre files, you can do this:

    $ paste c1 c2 | awk '{print $1 + $2}'
    

    Or (without AWK):

    $ paste c1 c2 | while read i j; do echo $(($i+$j)); done
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I fix the following error? error: cs0016 could not write to output
I can't fix this problem on my listview template: i have the error as
How can I fix my code under this text? //puncts = puncts ?? new
I can't fix these errors. They are all related: Line 110, Column 36: document
I can't figure out how to fix this PyCharm warning. I started getting it
Q: How can I fix this problem without hacking the tutorial code too much?
I have to fix a glitch with this code someone wrote but I'm not
How do I fix the following issue: I've tried setting the z-index of my
Fix for rpcrt4.dll was given in Windows NT 4.0. I got this from a
I need to fix some text that lies between delimiters for the following cases:

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.