Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sum(1) [linux man page]

SUM(1)								   User Commands							    SUM(1)

NAME
sum - checksum and count the blocks in a file SYNOPSIS
sum [OPTION]... [FILE]... DESCRIPTION
Print checksum and block counts for each FILE. -r use BSD sum algorithm, use 1K blocks -s, --sysv use System V sum algorithm, use 512 bytes blocks --help display this help and exit --version output version information and exit With no FILE, or when FILE is -, read standard input. AUTHOR
Written by Kayvan Aghaiepour and David MacKenzie. REPORTING BUGS
Report sum bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report sum translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for sum is maintained as a Texinfo manual. If the info and sum programs are properly installed at your site, the command info coreutils 'sum invocation' should give you access to the complete manual. GNU coreutils 8.5 February 2011 SUM(1)

Check Out this Related Man Page

USERS(1)							   User Commands							  USERS(1)

NAME
users - print the user names of users currently logged in to the current host SYNOPSIS
users [OPTION]... [FILE] DESCRIPTION
Output who is currently logged in according to FILE. If FILE is not specified, use /var/run/utmp. /var/log/wtmp as FILE is common. --help display this help and exit --version output version information and exit AUTHOR
Written by Joseph Arceneaux and David MacKenzie. REPORTING BUGS
Report users bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report users translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for users is maintained as a Texinfo manual. If the info and users programs are properly installed at your site, the command info coreutils 'users invocation' should give you access to the complete manual. GNU coreutils 8.5 February 2011 USERS(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to get the sum of all the lines in the file

Hi I have the following file, how I will calculate the sum of all the entries in the file. > cat abc 2 3 4 now the sum should be 2+3+4 = 9 (4 Replies)
Discussion started by: sdosanjh
4 Replies

2. BSD

Anyone using GNU BSD?

Is anyone using or planning to use GNU BSD in production yet? I'd like to hear experiences. (Debian GNU/NetBSD) (8 Replies)
Discussion started by: vpsville
8 Replies

3. Shell Programming and Scripting

awk sum columns

can anyone help me how do i add the colums using awk seperated by character @. for eg i have 3@4 2@9 5@1 the result should be 10 14 i tried using { sum+= $1 } END { print sum } but it just gives the result 10. can anyone help me with this one thank you and best regards (7 Replies)
Discussion started by: phone_book
7 Replies

4. Shell Programming and Scripting

if condition doesn't work

i want to get the value for column 4rth when i =4. please guide what i am doing wrong. thanks var=`cat file.csv` for i in $var; do { if ; then var4=$var4+$i fi echo $i } done I am geting this error message "0403-009 The specified number is not valid for this command." (8 Replies)
Discussion started by: sagii
8 Replies

5. Shell Programming and Scripting

Sum of values coming in a row

Hi, my requirement is to sum values in a row. eg: input is: sum,value1,value2,value3,.....,value N Required Output: sum,<summation of N values> Please help me... (5 Replies)
Discussion started by: MrGopal666
5 Replies

6. Shell Programming and Scripting

absolute sum

Hi, i want to caluculate sum and absolute sum information of the 2nd column. sum(abs(ENO)),sum(ENO) file1 contains the employee information. "abc","+10000.00","100" "bbc","-3000.00","400" "cbc","+20000.90","500" "dbc","-4000.00","600" output should get this Sum(abs(eno)) ... (5 Replies)
Discussion started by: onesuri
5 Replies

7. UNIX for Dummies Questions & Answers

Getting the sum

I am trying to get the sum of the first column of a file. When I use the same method for other files it works just fine... for some reason for the file below it gives me an error that I don't understand... I tried looking at different lines of the file and tried different things, but I still... (7 Replies)
Discussion started by: cosmologist
7 Replies

8. Shell Programming and Scripting

How to find complete file names in UNIX if i know only extention of file

Suppose I have a file which contains other file names with some extention . text file containt gdsds sd8ef g/f/temp_temp.sum yyeta t/unix.sum ghfp hrwer h/y/test.text.dat if then.... I want to get the complete file names, like for above file I should get output as temp_temp.sum... (4 Replies)
Discussion started by: panchal
4 Replies

9. Shell Programming and Scripting

Find the sum of files created 5 days before

Hi, I want to find the sum of all the files created 5 days ago and store it in a variable. (os is HP-UX) can this be extracted from ls -l Is there any other way of getting the sum of all the files created (4 Replies)
Discussion started by: bang_dba
4 Replies

10. Shell Programming and Scripting

awk sum giving incorrect value

cat T|awk -v format=$format '{ SUM += $1} END { printf format,SUM}' the file T has below data usghrt45tf:hrguat:/home/hrguat $ cat T -1363000.00123456789 -95000.00789456123 -986000.0045612378 -594000.0015978 -368939.54159753258415 -310259.0578945612 -133197.37123456789... (4 Replies)
Discussion started by: zulfi123786
4 Replies

11. Shell Programming and Scripting

awk sum entire string

Hi I am trying to carry out a sum on a file (totals.txt). The file looks like: So far i have this command this returns 20610 I however want it to return 000000206100 Any help would be great thanks! (6 Replies)
Discussion started by: nwalsh88
6 Replies

12. Shell Programming and Scripting

SUM semicolon-seperated values from txt-file

Hello, (I'm a shell beginner) how can I sum the bold values of the following txt-file (values.txt) with bash shell. The result of the sum should be written in a new txt file (sum.txt): ... Thanks in advance (5 Replies)
Discussion started by: milu
5 Replies

13. Shell Programming and Scripting

How to sum the value with negative values?

Hi Gurus, I have requirement need to sum the value, the logic is if the value is negative then time -1, I tried below two ways. one is failed, another one doesn't work. awk -F"," '{if($8< 0 $8*-1 else $8) sum+=$8}{print sum, $8} END{printf("%.2f\n",sum)}' awk -F","... (4 Replies)
Discussion started by: ken6503
4 Replies

14. Shell Programming and Scripting

Need help the sum from loop

Hi all, I have one host i need to run in loop to check the capacity from different frame and get the output to one file and sum it and convert to TB this is Code #!/bin/ksh DATE=`date '+%d%m%y'` for f in `cat /home/esx-capacity/esx-host.txt` do for g in `cat /home/esx-capacity/frame`... (10 Replies)
Discussion started by: ranjancom2000
10 Replies

15. Shell Programming and Scripting

Get the average of lines with the same first 4 letters

How to sum up and print into the next line the total SUM. ]$ cat hhhh aaa1a 1 aaa1g 2 aaa1f 3 baa4f 3 baa4d 4 baa4s 4 cddg1 3 cddg3 4 cddfg 1 $ cat hhhh|awk ' {sum+=$2} END {print sum}' 25 Desire output: aaa1a 1 (13 Replies)
Discussion started by: kenshinhimura
13 Replies