Find Jobs
Hire Freelancers

Calculate the sum of 200 variables VAR_01 the VAR_200 in bash script

$10-40 USD

Completed
Posted over 9 years ago

$10-40 USD

Paid on delivery
I have 100 variables, created in VAR_01 to VAR_100 by another script. Necessary to add the final value of them. That's it ..... I've tried -------------------------------------------------------------------------- !/bin/bash for i in $(seq 1 100) do COUTER=`echo "$COUTER + $VAR_$i" | bc` done -------------------------------------------------------------------------- but not works !!!! These variables were 100 are created by another scrit, which runs before that party must do the sum. I would like to find the best way to do this safely and efficiently.
Project ID: 7042591

About the project

4 proposals
Remote project
Active 9 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
That's a real easy fix - I can do it in 5 minutes. I've been writing bash for 20 years. I just did a script doing the same work.
$15 USD in 0 day
5.0 (4 reviews)
2.1
2.1
4 freelancers are bidding on average $23 USD for this job
User Avatar
Please explain it a little better what is var_01 to var_100 are they files? Do you want to count all variables and in an output file and write the final value at the end of the file? Regards usman
$30 USD in 1 day
5.0 (109 reviews)
7.2
7.2
User Avatar
A proposal has not yet been provided
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
A proposal has not yet been provided
$20 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of BRAZIL
Natal, Brazil
5.0
10
Payment method verified
Member since Jan 6, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.