Sponsored Content
Top Forums Shell Programming and Scripting sum numbers of multiple files Post 302681449 by vgersh99 on Friday 3rd of August 2012 12:06:41 PM
Old 08-03-2012
Please provide a desired output based on a sample input (using code tags).
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to find a sum of multiple numbers

I have a command which returns some numbers as follows: $ls -l ${dbname}.ix* | awk '{print $5 }' 929792 36864 57344 73728 53248 114688 How can I find the sum of those numbers by piping this output into 'awk' or some other editor/command? Thanks a lot -A (3 Replies)
Discussion started by: aoussenko
3 Replies

2. Shell Programming and Scripting

sum numbers in multiple files

I have 11 directories with around 200 files in each. In each directory the files are labeled out.0 through out.201 . Each file has around 118 numbers in a single column. I need to sum the files in each directory so each directory will have a resultant vector that is 118 numbers long. I then... (5 Replies)
Discussion started by: pattywac
5 Replies

3. Shell Programming and Scripting

Read the data from multiple files and sum the value

Hi all, I have a requirement where i have to read multiple files using Shell Script in Korn Shell. each file will have the 3rd line as the amount field, i have to read this amount field and sum it for all the files. any idea on how to achieve this?? (i think i can achieve it using a loop,... (9 Replies)
Discussion started by: nvuradi
9 Replies

4. Shell Programming and Scripting

Sum Numbers from different files

Hi All, I need to print the sum of numbers from different files. Input files: file1.out 10 20 30 file2.out 10 20 30 (5 Replies)
Discussion started by: saint2006
5 Replies

5. Shell Programming and Scripting

need [HELP] sum array multiple files

Hi.. I'm very newbie here.. I wonder if somebody can help me.. I have multiple directories with same out file name for each directories.. ./dirA/out.dat ./dirB/out.dat ./dirC/out.dat ..and so on.. for ./dirA/out.dat here is the structure content : for ./dirB/out.dat the same... (6 Replies)
Discussion started by: agiantz
6 Replies

6. UNIX for Dummies Questions & Answers

need [HELP] sum array multiple files

Hi.. I'm very newbie here.. I wonder if somebody can help me.. I have multiple directories with same out file name for each directories.. ./dirA/out.dat ./dirB/out.dat ./dirC/out.dat ..and so on.. for ./dirA/out.dat here is the structure content : for ./dirB/out.dat the same... (4 Replies)
Discussion started by: agiantz
4 Replies

7. Shell Programming and Scripting

Sum of a column in multiple files

I am performing the following operation on a file that looks like this 1000 0 10 479.0 1115478.07497 0.0 0.0 0.0872665 1000 10 20 1500.0 3470012.29304 0.0 0.0 0.261799 1000 20 30 2442.0 5676346.87758 0.0 0.0 0.436332 1000 30 40 3378.0 7737905.30957 0.0 0.0 0.610865 1000 40 50 4131.0... (2 Replies)
Discussion started by: kayak
2 Replies

8. Shell Programming and Scripting

Sum of numbers in three or more files

I have files : cat file1 15 88 44 667 33 4cat file2 445 66 77 3 56 (12 Replies)
Discussion started by: Natalie
12 Replies

9. Shell Programming and Scripting

Need to sum up a column value from multiple files into Credit and Debit categories using awk command

i have multiple files with Batch Header, Record detail & Batch trailer data in the files like : BH 20150225950050N8262 RD 20140918000000 99999999 unk Deferred Settlement -13950 BT01 -13950 *Above sample data donot have the spaces coorectly defined. I do have multiple batch trailer... (1 Reply)
Discussion started by: kcdg859
1 Replies

10. Shell Programming and Scripting

Shell script count lines and sum numbers from multiple files

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)
Discussion started by: Elly
5 Replies
LINTIAN-INFO(1) 					User Contributed Perl Documentation					   LINTIAN-INFO(1)

NAME
       lintian-info - give detailed information about Lintian's error tags

SYNOPSIS
       lintian-info [log-file...]

       lintian-info --tags tag ...

DESCRIPTION
       The lintian-info command parses the output of the lintian command and gives verbose information about the listed Lintian error tags, parses
       a Lintian override file and gives verbose information about the tags included, or (if given the -t or --tags option) explains a given tag
       or tags.

       If no log-file is specified on the command line, this command expects its input on stdin. Thus, the output of lintian can either be piped
       through lintian-info or a log file produced by lintian can be processed with this command.  (Note, though, that the lintian command has a
       command line option -i to display the same results as lintian-info, so you will not normally need to pipe the output of lintian into this
       command.)

OPTIONS
       -a, --annotate
	   Read from standard input or any files specified on the command line and search the input for lines formatted like Lintian override
	   entries.  For each one that was found, display verbose information about that tag.

       -h, --help
	   Display usage information and exit.

       --profile prof
	   Use the severities from the vendor profile prof when displaying tags.  If the profile name does not contain a slash, the default
	   profile for than vendor is chosen.

	   If not specified, lintian-info loads the best profile for the current vendor.

	   Please Refer to the Lintian User Manual for the full documentation of profiles.

       -t, --tags
	   Rather than treating them as log file names, treat any command-line options as tag names and display the descriptions of each tag.

EXIT STATUS
       If -t or --tags was given and one or more of the tags specified were unknown, this command returns the exit code 1.  Otherwise, it always
       returns with exit code 0.

SEE ALSO
       lintian(1)

AUTHORS
       Niels Thykier <niels@thykier.net>

       Richard Braakman <dark@xs4all.nl>

       Christian Schwarz <schwarz@monet.m.isar.de>

perl v5.14.2							    2013-02-16							   LINTIAN-INFO(1)
All times are GMT -4. The time now is 05:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy