Sponsored Content
Full Discussion: SUM of Backup Files
Top Forums Shell Programming and Scripting SUM of Backup Files Post 302343172 by edidataguy on Tuesday 11th of August 2009 11:16:53 PM
Old 08-12-2009
Code:
cat SUM_OF_FILES.txt > awk '/^-/ {total += $5} END {printf "%15.2f\n",total}'

What is the above line supposed to do?
Where you trying to do this?
Code:
cat SUM_OF_FILES.txt   |   awk '/^-/ {total += $5} END {printf "%15.2f\n",total}'
 
or may be this
 
awk '/^-/ {total += $5} END {printf "%15.2f\n",total}' SUM_OF_FILES.txt

Cannot go through you description.
Just post what does the file SUM_OF_FILES.txt contain.
As you use >>, I presume you must be having more than one line in it.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to sum values from 2 different files?

Hi I am trying to add count values from two different files into one file. Could any body please suggest me best command to do this? My problem was as follows: a.txt b.txt c.txt 10 20 30(needed) i tried cat a.txt b.txt > c.txt (its not adding the values) Thanks in advance.. Praveen (8 Replies)
Discussion started by: npk2210
8 Replies

2. Shell Programming and Scripting

How to sum 2 files?

i have arq1.txt , like this: 1 2 3 4 5 and another arq2.txt 1 2 3 4 5 how to make this: 2 4 (8 Replies)
Discussion started by: beandj
8 Replies

3. Shell Programming and Scripting

sum the columns of files

I have several csv files like this: file1.csv 1 12 1 2 8 9 3 9 2 4 5 9 ... file2.csv 1 0 1 2 2 3 3 4 1 ... file3.csv 1 0 1 2 4 0 ... I want the result like this 1 12 3 2 14 12 3 13 3 (10 Replies)
Discussion started by: frewise
10 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

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

8. Shell Programming and Scripting

Sum fields of different files using awk

I'm trying to sum each field of the second column over many different files. For example: file1: file2: 1 5 1 5 2 6 2 4 3 5 3 3 To get: file3 1 10 2 10 3 8 I found answer when there are only 2 files as... (10 Replies)
Discussion started by: rogeriog.em
10 Replies

9. 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

10. Shell Programming and Scripting

How to get CRC check sum of files in java EAR file without extracting .jar/.war files to disk.?

unzip -v gives CRC info of each file in a zip(in my case .EAR) file. # unzip -v my-application.ear Archive: my-application.ear Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- 197981 Defl:N 183708 7%... (1 Reply)
Discussion started by: kchinnam
1 Replies
backup-manager(8)					      System Manager's Manual						 backup-manager(8)

NAME
backup-manager - An easy to use backup tool for your Linux box. SYNOPSIS
backup-manager [options] DESCRIPTION
Backup Manager is an easy-to-use tool for generating archives. It is designed with simplicity in mind for those who don't want an obfuscated tool for making tarballs. There are different methods for building archives: tarballs, incremental tarballs, mysql dumps, svn dump. You can also write your own method with a generic method that will execute a command and will archive its output. Every times you run Backup Manager, you can upload archives thanks to a couple of upload methods: through FTP, SSH or even with RSYNC. It's also possible to export your archives to removable media like CDR or DVD. CONFIGURATION FILES
Backup Manager's behavior is defined in configuration files. You can use different configuration files at the same time. The default con- figuration file is `/etc/backup-manager.conf'. An example should have been provided with the program, most of the time it's installed in `/usr/share/backup-manager/backup-man- ager.conf.tpl'. If you want exhaustive details about how to write your own configuration files, please refer to the Backup Manager User Guide: http://www.backup-manager.org/documentation/user-guide/ OPTIONS
--version Show the version number. --verbose|-v Print what happens to STDOUT. --no-warnings Disable warnings. --help|-h Print a short help message. --upload|-u Just upload the files. --purge|-p Just purge old archives. --burn|-b Just burn the archives. --md5check|-m Just perform the MD5 checkup on the CDR/CDRW. --conffile|-c file Use an alternate config file. --force|-f Force overwrite of existing archives. --no-upload Disable the uploading process. --no-burn Disable the burning process. --no-purge Disable the purging process. BUGS
If you find a bug or want to submit a wish-list to the development team, feel free to use the official Bug Tracking System: http://bugzilla.backup-manager.org WEBSITE
To find latest news and releases, come to the official website: http://www.backup-manager.org SEE ALSO
backup-manager-upload(8), ssh-keygen(1) AUTHOR
Alexis Sukrieh <sukria@backup-manager.org> backup-manager(8)
All times are GMT -4. The time now is 04:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy