Take a look at my pseudocode, post #5 again.
Your code; there are numerous minor errors and to go through them all before you have solved your project would mean I would be writing it.
Let's get your logic sorted first. You will see from my CODE section how different you logic is from mine.
These lines are fine:
(Just a note, there is no need for the double brackets [[ ]] for this example, single brackets [ ] would suffice. It will still work with double brackets however.)
Again read Don's post #4 thoroughly...
Have another go, and if you increase your "counter" by a certain even number then you will see it all fall into place.
And finally, please use CODE tags, the "</>" icon on the tool bar.
Hi,
i want to sum all nubers in one column. Example:
12.23
11
23.01
3544.01
I'm trying to do this in awk, but it doesn't work properly.
Seems like awk is summing only integers, for example:
12
11
23
3544
It cuts off numbers after dot.
I used this command:
akw /text/ file.txt |nawk... (1 Reply)
hello im looking for short way to sum numbers from stdout the way i found to do it is to long for me i wander if there is shorter way to do it
ok it 2 stage action
this will make the list of number in to file sum.txt
grep -c include *.c | awk '{l=split($0,a,":");print a;}' > sum.txt
this... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Shell script to find sum of first n numbers of Fibonacci series
2. Relevant commands, code, scripts,... (0 Replies)
cat *.out |grep "<some text>" | awk '{print $6}'
For ex,This will reutrn me
11111
22222
is it possible to add these two numbers in the above given command itself?I can write this to a file and find the sum.
But I prefer to this calculation in the above given line itself.
Any... (3 Replies)
I basically have a file where I had to do a bunch of greps to get a list of numbers
example: a file called numbers.txt
10000
10000
superman
10000
batman
10000
10000
grep '100' * |
10000
10000
10000
10000
10000 (2 Replies)
Hi all;
Here is my file:
V1.3=4
V1.4=5
V1.1=3
V1.2=6
V1.3=6
Please, can you help me to write a script shell that counts the sum of values in my file (4+5+3+6+6) ?
Thank you so much for help.
Kind regards. (3 Replies)
I want to count the number of lines, I need this result be a number, and sum the last numeric column, I had done to make this one at time, but I need to make this for a crontab, so, it has to be an script, here is my lines:
It counts the number of lines:
egrep -i String file_name_201611* |... (5 Replies)
I need help with this assignment. I'm very new to using UNIX/LINUX, and my only previous experience with programing anything is using python.
We are writing scripts using vim, and this one I'm stumped on.
"Write a shell script that finds and display the sum of even positive integers from 0 to... (5 Replies)
Discussion started by: Nastybutler
5 Replies
LEARN ABOUT DEBIAN
maria-cso
MARIA-CSO(1) General Commands Manual MARIA-CSO(1)NAME
maria-cso - shared library generator for maria
SYNOPSIS
maria-cso directory library.so file.c...
maria-cso directory library.so file.c
DESCRIPTION
This manual page documents briefly the maria-cso command.
maria-cso is a shell script invoked by maria in order to compile generated C code into dynamically loadable shared object files. The
script invokes the C compiler and the linker, and it calculates checksums in order to avoid compiling unmodified modules.
The directory argument specifies the location of the source files. When the script is invoked with one file.c argument, it translates the
file to the shared object library.so.
When maria-cso is invoked with multiple file.c arguments, it computes a checksum of a file named multiset.h and of each argument. When the
header file multiset.h has been changed since the previous invocation of maria-cso, everything will be recompiled. Otherwise only those
file.c modules that have been modified will be recompiled. The checksum files are multiset.sum and c.sum.
SEE ALSO maria(1), sh(1).
ENVIRONMENT VARIABLES
CC Name of the C compiler
CFLAGS Command-line switches to be passed to the C compiler
DEFINES
Preprocessor macro definitions to be passed to the C compiler
FILES
/usr/share/maria/runtime/*.h
Header files for the run-time library
AUTHOR
This manual page was written by Marko Makela <msmakela@tcs.hut.fi>. The maria-cso script and the compilation option were designed and
implemented by Marko Makela. Please see the copyright file in /usr/share/doc/maria for details.
August 10, 2001 MARIA-CSO(1)