Sponsored Content
Full Discussion: Calculating totals in AWK
Top Forums Shell Programming and Scripting Calculating totals in AWK Post 302229923 by Franklin52 on Thursday 28th of August 2008 06:47:12 AM
Old 08-28-2008
The system I'm working on at the moment doesn't support the -ls option with find. Can you post some lines of the output of your find command?

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

summarising totals in awk

awk ' FILENAME == "all" { balance += substr($0,17,13) dt = substr($0,6,8) } END { for ( name in balance ) printf("%013s %3s of %8s\n", balance/100,name,dt) | "sort " } ' all > summation using this code i wanted to take summary totals of... (3 Replies)
Discussion started by: paresh n doshi
3 Replies

2. Shell Programming and Scripting

[Solved] awk calculating between lines

Hey guys, maybe you can help me with this... I want to read input.dat line by line, while doing a simple calculation between the second column value of the current line and the second column value of the next line (like a difference). input is something like this: 0 3.945757 1 ... (1 Reply)
Discussion started by: origamisven
1 Replies

3. Shell Programming and Scripting

Calculating an integer with awk

I would like to extract a number from $0 and calculate if it can be devided by 25. Though the number can also be less then 25 or bigger than 100. How do i extract the number and how can the integer be calculated? String: "all_results">39</span>I am looking for the number between "all_results"> ... (5 Replies)
Discussion started by: sdf
5 Replies

4. Shell Programming and Scripting

AWK way of calculating growth

Hi All, IS there any 'awk' way to manipulate following data? Fruit Date Count Apple 20/08/2011 5 Apple 27/08/2011 7 Apple 05/09/2011 11 Apple 12/09/2011 3 Apple 19/09/2011 25 . . . . Orange 20/08/2011 9 Orange 27/08/2011 20 Orange 27/08/2011 7 Orange 05/09/2011 15 Orange... (3 Replies)
Discussion started by: aniketdixit
3 Replies

5. Shell Programming and Scripting

Calculating the epoch time from standard time using awk and calculating the duration

Hi All, I have the following time stamp data in 2 columns Date TimeStamp(also with milliseconds) 05/23/2012 08:30:11.250 05/23/2012 08:30:15.500 05/23/2012 08:31.15.500 . . etc From this data I need the following output. 0.00( row1-row1 in seconds) 04.25( row2-row1 in... (5 Replies)
Discussion started by: ks_reddy
5 Replies

6. Shell Programming and Scripting

Calculating average with awk

I need to find the average from a file like: data => BW:123 M:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0' data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0' data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0' data => BW:123 N:30 RTD:0 1 0 1 0 0 1 1 1 1 0 0 1 1 0' data => BW:123 N:30 RTD:0 1... (4 Replies)
Discussion started by: Slagle
4 Replies

7. Shell Programming and Scripting

Calculating Running Variance Using Awk

Hi all, I am attempting to calculate a running variance for a file containing a column of numbers. I am using the formula variance=sum((x-mean(x))^2)/(n-1), where x is the value on the current row, and mean(x) is the average of all of the values up until that row. n represents the total number... (1 Reply)
Discussion started by: Jahn
1 Replies

8. Shell Programming and Scripting

awk to sum a column based on duplicate strings in another column and show split totals

Hi, I have a similar input format- A_1 2 B_0 4 A_1 1 B_2 5 A_4 1 and looking to print in this output format with headers. can you suggest in awk?awk because i am doing some pattern matching from parent file to print column 1 of my input using awk already.Thanks! letter number_of_letters... (5 Replies)
Discussion started by: prashob123
5 Replies

9. Shell Programming and Scripting

Grand totals in awk

I have a one-liner script like this that gives a total of everything in various directories: for i in *; do (cd $i && cd statelist && echo $i && ls -la |awk 'NR>3 {SUM += $5}\ END { print "Total number of elements " SUM }');done It works just great but at the end I want to print a grand... (3 Replies)
Discussion started by: newbie2010
3 Replies

10. UNIX for Beginners Questions & Answers

Calculating correlations across columns in awk

Hello, I came across a previous thread "awk-calculating-simple-correlation-rows" which calculated correlations across rows in awk. Code: awk '{ a = 0; for (i = 2; i <= NF; ++i) a += $i; a /= NF-1 b = 0; for (i = 2; i <= NF; ++i) b += ($i - a) ^ 2; b = sqrt(b) if... (7 Replies)
Discussion started by: Ross
7 Replies
whom(1) 						      General Commands Manual							   whom(1)

NAME
whom - report to whom a message is addressed (only available within the message handling system, mh) SYNOPSIS
whom [options] [file] OPTIONS
Specifies the alias file to be consulted by whom. If you have used one or more aliases in your message header, whom will consult the named file to find those aliases, and will print the full addresses as its output. You can reference more than one file, but each file name must be preceded by the word -alias. See mh-alias(4) for more information. Checks that the addresses are valid. whom makes no guarantees that the addresses listed as being correct are really deliverable: rather, an address being listed as correct means that at the time that whom was run, the address was thought to be deliverable by the transport service. For local addresses, this means that the local user does exist, and that the address was deliverable at the time of checking. For network and uucp addresses, it means that the syntax of the address is valid. Sets the draft message to be the standard file draft in your Mail directory. Specifies the folder in which whom searches for the draft message. The default is to use the current message in the named folder. You can select another message by using the -draftmessage option. For more information on using a draft folder, see comp(1). The -draftfolder option is often set up in your user pro- file; see mh_profile(4) for more information. Specifies the draft message to be used. If you specify a folder with the -draftfolder option, the -draftmessage option takes the number of a message in that folder. If you do not specify a folder, -draftmessage takes the name of a file. If you do not give an absolute pathname (one beginning with a / or or ), -draftmessage assumes that the file is located in your Mail directory. Prints a list of the valid options to this command. Specifies the format of the addresses to be checked. The only value allowed is smtp, which checks that addresses are deliverable over the standard mail system. Additional values are supported only for use with other mail systems. The defaults for this command are: file defaults to <mh-dir>/draft -nocheck -alias /usr/lib/mh/MailAliases -mts smtp DESCRIPTION
The whom command is used to expand the headers of a message into a set of addresses, and optionally to verify that those addresses are deliverable at that time if -check is given. The whom command is often invoked as one of the options offered by the whatnow program when you have finished editing a draft message. See whatnow(1) for more details. If you want to run whom on a named file, you can supply a file argument. This argument allows you to specify a named file; if you want to run whom on an existing message, use the -draftfolder and -draftmessage options. If you do not give an absolute pathname (one beginning with a / or or ), whom assumes that the named file is in your current working directory. RESTRICTIONS
For this version, the -mts option only supports the value smtp. Additional values are supported for use only with other mail systems. PROFILE COMPONENTS
Path: To determine your MH directory (mh-dir) Draft-Folder: To find the default draft-folder postproc: Program to post the message EXAMPLES
In the following example, whom would use the current message in the +drafts folder: % whom -draftfolder +drafts smith: address OK In the next example, whom searches for message 2 in the folder +drafts: % whom -draftfolder +drafts -draftmessage 2 davis@hostname: address OK FILES
The user profile. SEE ALSO
comp(1), mh-alias(4), post(8) whom(1)
All times are GMT -4. The time now is 06:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy