Sponsored Content
Full Discussion: awk Moving Average
Top Forums Shell Programming and Scripting awk Moving Average Post 303001491 by theflamingmoe on Friday 4th of August 2017 06:06:45 PM
Old 08-04-2017
Wow, thanks so much RudiC. I'm still going over your reply trying to digest parts of your code. Much appreciated.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to average in awk

Hi, I have the data like this $1 $2 1 12 2 13 3 14 4 12 5 12 6 12 7 13 8 14 9 12 10 12 i want to compute average of $1 and $2 every 5th line (1-5 and 6-10) Please help me with awk Thank you (4 Replies)
Discussion started by: saint2006
4 Replies

2. Shell Programming and Scripting

Average in awk

Hi I am looking for an awk script which can compute average of all the fields every 5th line. The file looks: A B C D E F G H I J K L M 1 18 13 14 12 14 13 11 12 12 15 15 15 2 17 17 13 13 13 12 12 11 12 14 15 14 3 16 16 12 12 12 11 11 12 11 16 14 13 4 15 15 11 11 11 12 11 12 11... (6 Replies)
Discussion started by: saint2006
6 Replies

3. Shell Programming and Scripting

Partial average of a column with awk

Hello, Let's assume I have 100 files FILE_${m} (0<m<101). Each of them contains 100 lines and 10 columns. I'd like to get in a file called "result" the average value of column 3, ONLY between lines 11 and 17, in order to plot that average as a function of the parameter m. So far I can compute... (6 Replies)
Discussion started by: DMini
6 Replies

4. Shell Programming and Scripting

AWK novice - calculate the average

Hi, I have the following data in a file for example: P1 XXXXXXX.1 YYYYYYY.1 ZZZ.1 P1 XXXXXXX.2 YYYYYYY.2 ZZZ.2 P1 XXXXXXX.3 YYYYYYY.3 ZZZ.3 P1 XXXXXXX.4 YYYYYYY.4 ZZZ.4 P1 XXXXXXX.5 YYYYYYY.5 ZZZ.5 P1 XXXXXXX.6 YYYYYYY.6 ZZZ.6 P1 XXXXXXX.7 YYYYYYY.7 ZZZ.7 P1 XXXXXXX.8 YYYYYYY.8 ZZZ.8 P2... (6 Replies)
Discussion started by: alex2005
6 Replies

5. Shell Programming and Scripting

Calculate Average AWK

I want to calculate the average line by line of some files with several lines on them, the files are identical, just want to average the 3rd columns of those files.:wall: Example file: File 1 001 0.046 0.667267 001 0.047 0.672028 001 0.048 0.656025 001 0.049 ... (2 Replies)
Discussion started by: AriasFco
2 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

awk or Bash: Cumulative average

For the data I would like to parse down and for each parsing I want a cumulative averaging, stored in an array that can be output. I.e. 546/NR = 546 (546+344)/NR=(546+344)/2 = etc. For N record input I want N values of the average (a block averaging effectively) Any... (3 Replies)
Discussion started by: chrisjorg
3 Replies

8. Shell Programming and Scripting

awk to combine by field and average by another

In the below awk I am trying to combine all matching $4 into a single $5 (up to the -), and count the lines in $6 and average all values in $7. The awk is close but it seems to only be using the last line in the file and skipping all others. The posted input is a sample of the file that is over... (3 Replies)
Discussion started by: cmccabe
3 Replies

9. Shell Programming and Scripting

Average across multiple columns - awk

Hi forum members, I'm trying to get an average of multiple columns in a csv file using awk. A small example of my input data is as follows: cu,u3o8,au,ag -9,20,-9,3.6 0.005,30,-9,-9 0.005,50,10,3.44 0.021,-9,8,3.35 The following code seems to do most of what I want gawk -F","... (6 Replies)
Discussion started by: theflamingmoe
6 Replies

10. Shell Programming and Scripting

SMA (Single Moving Average) and Standard Deviation

Hello Team, I am using the following awk script to calculate the SMA (Single Moving Average) for an specific period but now I would like to include the standard deviation output. Could you please help me to modify this awk shell script awk -F, -v points=5 ' { a = $2; ... (4 Replies)
Discussion started by: csierra
4 Replies
KRB5_DIGEST(3)						   BSD Library Functions Manual 					    KRB5_DIGEST(3)

NAME
krb5_digest, krb5_digest_alloc, krb5_digest_free, krb5_digest_set_server_cb, krb5_digest_set_type, krb5_digest_set_hostname, krb5_digest_get_server_nonce, krb5_digest_set_server_nonce, krb5_digest_get_opaque, krb5_digest_set_opaque, krb5_digest_get_identifier, krb5_digest_set_identifier, krb5_digest_init_request, krb5_digest_set_client_nonce, krb5_digest_set_digest, krb5_digest_set_username, krb5_digest_set_authid, krb5_digest_set_authentication_user, krb5_digest_set_realm, krb5_digest_set_method, krb5_digest_set_uri, krb5_digest_set_nonceCount, krb5_digest_set_qop, krb5_digest_request, krb5_digest_get_responseData, krb5_digest_get_rsp, krb5_digest_get_tickets, krb5_digest_get_client_binding, krb5_digest_get_a1_hash -- remote digest (HTTP-DIGEST, SASL, CHAP) suppport LIBRARY
Kerberos 5 Library (libkrb5, -lkrb5) SYNOPSIS
#include <krb5.h> typedef struct krb5_digest *krb5_digest; krb5_error_code krb5_digest_alloc(krb5_context context, krb5_digest *digest); void krb5_digest_free(krb5_digest digest); krb5_error_code krb5_digest_set_type(krb5_context context, krb5_digest digest, const char *type); krb5_error_code krb5_digest_set_server_cb(krb5_context context, krb5_digest digest, const char *type, const char *binding); krb5_error_code krb5_digest_set_hostname(krb5_context context, krb5_digest digest, const char *hostname); const char * krb5_digest_get_server_nonce(krb5_context context, krb5_digest digest); krb5_error_code krb5_digest_set_server_nonce(krb5_context context, krb5_digest digest, const char *nonce); const char * krb5_digest_get_opaque(krb5_context context, krb5_digest digest); krb5_error_code krb5_digest_set_opaque(krb5_context context, krb5_digest digest, const char *opaque); const char * krb5_digest_get_identifier(krb5_context context, krb5_digest digest); krb5_error_code krb5_digest_set_identifier(krb5_context context, krb5_digest digest, const char *id); krb5_error_code krb5_digest_init_request(krb5_context context, krb5_digest digest, krb5_realm realm, krb5_ccache ccache); krb5_error_code krb5_digest_set_client_nonce(krb5_context context, krb5_digest digest, const char *nonce); krb5_error_code krb5_digest_set_digest(krb5_context context, krb5_digest digest, const char *dgst); krb5_error_code krb5_digest_set_username(krb5_context context, krb5_digest digest, const char *username); krb5_error_code krb5_digest_set_authid(krb5_context context, krb5_digest digest, const char *authid); krb5_error_code krb5_digest_set_authentication_user(krb5_context context, krb5_digest digest, krb5_principal authentication_user); krb5_error_code krb5_digest_set_realm(krb5_context context, krb5_digest digest, const char *realm); krb5_error_code krb5_digest_set_method(krb5_context context, krb5_digest digest, const char *method); krb5_error_code krb5_digest_set_uri(krb5_context context, krb5_digest digest, const char *uri); krb5_error_code krb5_digest_set_nonceCount(krb5_context context, krb5_digest digest, const char *nonce_count); krb5_error_code krb5_digest_set_qop(krb5_context context, krb5_digest digest, const char *qop); krb5_error_code krb5_digest_request(krb5_context context, krb5_digest digest, krb5_realm realm, krb5_ccache ccache); const char * krb5_digest_get_responseData(krb5_context context, krb5_digest digest); const char * krb5_digest_get_rsp(krb5_context context, krb5_digest digest); krb5_error_code krb5_digest_get_tickets(krb5_context context, krb5_digest digest, Ticket **tickets); krb5_error_code krb5_digest_get_client_binding(krb5_context context, krb5_digest digest, char **type, char **binding); krb5_error_code krb5_digest_get_a1_hash(krb5_context context, krb5_digest digest, krb5_data *data); DESCRIPTION
The krb5_digest_alloc() function allocatates the digest structure. The structure should be freed with krb5_digest_free() when it is no longer being used. krb5_digest_alloc() returns 0 to indicate success. Otherwise an kerberos code is returned and the pointer that digest points to is set to NULL. krb5_digest_free() free the structure digest. SEE ALSO
krb5(3), kerberos(8) HEIMDAL
February 18, 2007 HEIMDAL
All times are GMT -4. The time now is 08:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy