Sponsored Content
Top Forums Shell Programming and Scripting Getting average ,maximum and minimum value Post 302766269 by zozoo on Monday 4th of February 2013 01:05:16 PM
Old 02-04-2013
Getting average ,maximum and minimum value

Hi Evreyone

below is the sample data i have in one file


Code:
Wed Jan 30  7	:04:50 2013	type1		419990050	101	ms
Wed Jan 30	 7	:04:58 2013	type1		488226363	101	ms
Wed Jan 30	 7	:05:03 2013	type1		431525334	101	ms
Wed Jan 30	 7	:05:48 2013	type2		400676615	101	ms
Wed Jan 30	 8	:09:46 2013	type3		414765261	101	ms
Wed Jan 30	 8	:10:03 2013	type4		408521082	101	ms
Wed Jan 30	 8	:19:02 2013	type3		418245756	101	ms
Wed Jan 30	 8	:19:07 2013	type2		413860792	101	ms
Wed Jan 30	 7	:21:11 2013	type2		421664181	101	ms
Wed Jan 30	 7	:21:45 2013	type3		448474303	101	ms
Wed Jan 30	 9	:21:56 2013	type1		431636405	101	ms
Wed Jan 30  9	:26:19 2013	type1		439923226	101	ms
Wed Jan 30	 9	:19:07 2013	type3		413860792	101	ms
Wed Jan 30	 7	:21:11 2013	type4		421664181	101	ms
Wed Jan 30	 7	:21:45 2013	type2		448474303	101	ms
Wed Jan 30	 7	:21:56 2013	type2		431636405	101	ms
Wed Jan 30  7	:26:19 2013	type3		439923226	101	ms


i have large amoount of data similar to above its response time for diffrent types of request (typ1,type2,type3,type4)on each day .

so from above what i require is
i if space is delimiter then

4 th filed is hours filed ,
so for each hour say from 7to8, 8to9 based for type 1 (7th field) what is count, max ,min and avg value,what is the in field 9 (ex value similarly for type2 ,type3,type4
 

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Find the Maximum value and average of a column

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am trying to complete a script which will allow me to find: a) reads a value from the keyboard. (ask the... (4 Replies)
Discussion started by: dstewie
4 Replies

2. Shell Programming and Scripting

minimum and maximum from columns

Hi Friends, my input file is this way chr1 100 120 abc chr1 100 121 def chr1 100 122 ghi chr2 240 263 kil chr2 240 276 ghj chr2 255 290 hjh my output chr1 100 122 abc chr2 240 276 kil chr2 255 290 hjh Basically, I want to match on first and second column and then print the... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

3. Shell Programming and Scripting

Print minimum and maximum values using awk

Can I print the minimum and maximum values of values in first 4 columns ? input 3038669 3038743 3037800 3038400 m101c 3218627 3218709 3217600 3219800 m290 ............. output 3037800 3038743 m101c 3217600 3219800 m290 (2 Replies)
Discussion started by: quincyjones
2 Replies

4. Shell Programming and Scripting

Finding minimum maximum and average

I am trying to find the minimum maximum and average from one file which has values Received message from https://www.demandmatrix.net/app/dm/xml] in milliseconds. Received message from https://www.demandmatrix.net/app/dm/xml] in milliseconds. Received message from... (5 Replies)
Discussion started by: aroragaurav.84
5 Replies

5. Shell Programming and Scripting

Extract minimum/maximum using awk

From the below table I want to print highest value and lowest value using awk script. aaa 55 66 96 77 ggg 22 96 77 23 ddd 74 58 18 3 kkk 45 89 47 92 zzz 34 58 89 92 Thanks, Green edit by bakunin: it sure is not news to you that you should use CODE-tags, no? And that we do not want such... (3 Replies)
Discussion started by: gwgreen1
3 Replies

6. UNIX and Linux Applications

Maximum and minimum threshold in autosys

Good evening In a production system there are houndred of Jobs running and i´ve got to monitor all of them, but the problem arises when a job running takes much longer or conversely takes nothing and as operator is almost imposible to detect the máximum or mínimum threshold for a running job. Ive... (1 Reply)
Discussion started by: alexcol
1 Replies

7. Shell Programming and Scripting

Output minimum and maximum values for replicates ID

Hi All I hope that someone could help me! I have an input file like this, with 4 colum(ID, feature1, start, end): a x 1 5 b x 3 10 b x 4 9 b x 5 16 c x 5 9 c x 4 8 And my output file should be like this: a x 1 5 b x 3 16 c x 4 9 What I would like to do is to output for each ID... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies

8. Shell Programming and Scripting

Find minimum and maximum values based on column with associative array

Hello, I need to find out the minimum and maximum values based on specific column, and then print out the entire row with the max value. Infile.txt: scf6 290173 290416 . + X_047241 T_00113118-1 scf6 290491 290957 . + X_047241 T_00113118-2 scf6 290898 290957 . + X_047241 T_00113119-3 scf6... (2 Replies)
Discussion started by: yifangt
2 Replies

9. Shell Programming and Scripting

awk to find maximum and minimum from column and store in other column

Need your support for below. Please help to get required output If column 5 is INV then only consider column1 and take out duplicates/identical rows/values from column1 and then put minimum value of column6 in column7 and put maximum value in column 8 and then need to do subtract values of... (7 Replies)
Discussion started by: as7951
7 Replies

10. UNIX for Beginners Questions & Answers

Create a list from minimum and maximum

Using the input file for each row , using columns 1 (min) and 2 (max) , and with increment of 4 each time I want to create the output file. Input file 1000 1012 2000 2001 2000 2008 3000 3001 Output desired 1000 2000 2001 1004 2000 2001 1008 2000 2001 1012 2000 2001 2000 3000 3001... (5 Replies)
Discussion started by: jiam912
5 Replies
Heimdal NTLM library(3) 					Heimdalntlmlibrary					   Heimdal NTLM library(3)

NAME
Heimdal NTLM library - Functions void heim_ntlm_free_buf (struct ntlm_buf *p) void heim_ntlm_free_targetinfo (struct ntlm_targetinfo *ti) int heim_ntlm_encode_targetinfo (const struct ntlm_targetinfo *ti, int ucs2, struct ntlm_buf *data) int heim_ntlm_decode_targetinfo (const struct ntlm_buf *data, int ucs2, struct ntlm_targetinfo *ti) void heim_ntlm_free_type1 (struct ntlm_type1 *data) int heim_ntlm_encode_type1 (const struct ntlm_type1 *type1, struct ntlm_buf *data) void heim_ntlm_free_type2 (struct ntlm_type2 *data) int heim_ntlm_encode_type2 (const struct ntlm_type2 *type2, struct ntlm_buf *data) void heim_ntlm_free_type3 (struct ntlm_type3 *data) int heim_ntlm_encode_type3 (const struct ntlm_type3 *type3, struct ntlm_buf *data) int heim_ntlm_nt_key (const char *password, struct ntlm_buf *key) int heim_ntlm_calculate_ntlm1 (void *key, size_t len, unsigned char challenge[8], struct ntlm_buf *answer) int heim_ntlm_build_ntlm1_master (void *key, size_t len, struct ntlm_buf *session, struct ntlm_buf *master) int heim_ntlm_build_ntlm2_master (void *key, size_t len, struct ntlm_buf *blob, struct ntlm_buf *session, struct ntlm_buf *master) int heim_ntlm_keyex_unwrap (struct ntlm_buf *baseKey, struct ntlm_buf *encryptedSession, struct ntlm_buf *session) int heim_ntlm_ntlmv2_key (const void *key, size_t len, const char *username, const char *target, unsigned char ntlmv2[16]) int heim_ntlm_calculate_lm2 (const void *key, size_t len, const char *username, const char *target, const unsigned char serverchallenge[8], unsigned char ntlmv2[16], struct ntlm_buf *answer) int heim_ntlm_calculate_ntlm2 (const void *key, size_t len, const char *username, const char *target, const unsigned char serverchallenge[8], const struct ntlm_buf *infotarget, unsigned char ntlmv2[16], struct ntlm_buf *answer) int heim_ntlm_verify_ntlm2 (const void *key, size_t len, const char *username, const char *target, time_t now, const unsigned char serverchallenge[8], const struct ntlm_buf *answer, struct ntlm_buf *infotarget, unsigned char ntlmv2[16]) Detailed Description The NTLM core functions implement the string2key generation function, message encode and decode function, and the hash function functions. Function Documentation int heim_ntlm_build_ntlm1_master (void * key, size_t len, struct ntlm_buf * session, struct ntlm_buf * master) Generates an NTLMv1 session random with assosited session master key. Parameters: key the ntlm v1 key len length of key session generated session nonce, should be freed with heim_ntlm_free_buf(). master calculated session master key, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_build_ntlm2_master (void * key, size_t len, struct ntlm_buf * blob, struct ntlm_buf * session, struct ntlm_buf * master) Generates an NTLMv2 session random with associated session master key. Parameters: key the NTLMv2 key len length of key blob the NTLMv2 'blob' session generated session nonce, should be freed with heim_ntlm_free_buf(). master calculated session master key, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_calculate_lm2 (const void * key, size_t len, const char * username, const char * target, const unsigned char serverchallenge[8], unsigned char ntlmv2[16], struct ntlm_buf * answer) Calculate LMv2 response Parameters: key the ntlm key len length of key username name of the user, as sent in the message, assumed to be in UTF8. target the name of the target, assumed to be in UTF8. serverchallenge challenge as sent by the server in the type2 message. ntlmv2 calculated session key answer ntlm response answer, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_calculate_ntlm1 (void * key, size_t len, unsigned char challenge[8], struct ntlm_buf * answer) Calculate NTLMv1 response hash Parameters: key the ntlm v1 key len length of key challenge sent by the server answer calculated answer, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_calculate_ntlm2 (const void * key, size_t len, const char * username, const char * target, const unsigned char serverchallenge[8], const struct ntlm_buf * infotarget, unsigned char ntlmv2[16], struct ntlm_buf * answer) Calculate NTLMv2 response Parameters: key the ntlm key len length of key username name of the user, as sent in the message, assumed to be in UTF8. target the name of the target, assumed to be in UTF8. serverchallenge challenge as sent by the server in the type2 message. infotarget infotarget as sent by the server in the type2 message. ntlmv2 calculated session key answer ntlm response answer, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_decode_targetinfo (const struct ntlm_buf * data, int ucs2, struct ntlm_targetinfo * ti) Decodes an NTLM targetinfo message Parameters: data input data buffer with the encode NTLM targetinfo message ucs2 if the strings should be encoded with ucs2 (selected by flag in message). ti the decoded target info, should be freed with heim_ntlm_free_targetinfo(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_encode_targetinfo (const struct ntlm_targetinfo * ti, int ucs2, struct ntlm_buf * data) Encodes a ntlm_targetinfo message. Parameters: ti the ntlm_targetinfo message to encode. ucs2 ignored data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_encode_type1 (const struct ntlm_type1 * type1, struct ntlm_buf * data) Encodes an ntlm_type1 message. Parameters: type1 the ntlm_type1 message to encode. data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_encode_type2 (const struct ntlm_type2 * type2, struct ntlm_buf * data) Encodes an ntlm_type2 message. Parameters: type2 the ntlm_type2 message to encode. data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_encode_type3 (const struct ntlm_type3 * type3, struct ntlm_buf * data) Encodes an ntlm_type3 message. Parameters: type3 the ntlm_type3 message to encode. data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. void heim_ntlm_free_buf (struct ntlm_buf * p) heim_ntlm_free_buf frees the ntlm buffer Parameters: p buffer to be freed void heim_ntlm_free_targetinfo (struct ntlm_targetinfo * ti) Frees the ntlm_targetinfo message Parameters: ti targetinfo to be freed void heim_ntlm_free_type1 (struct ntlm_type1 * data) Frees the ntlm_type1 message Parameters: data message to be freed void heim_ntlm_free_type2 (struct ntlm_type2 * data) Frees the ntlm_type2 message Parameters: data message to be freed void heim_ntlm_free_type3 (struct ntlm_type3 * data) Frees the ntlm_type3 message Parameters: data message to be freed int heim_ntlm_keyex_unwrap (struct ntlm_buf * baseKey, struct ntlm_buf * encryptedSession, struct ntlm_buf * session) Given a key and encrypted session, unwrap the session key Parameters: baseKey the sessionBaseKey encryptedSession encrypted session, type3.session field. session generated session nonce, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_nt_key (const char * password, struct ntlm_buf * key) Calculate the NTLM key, the password is assumed to be in UTF8. Parameters: password password to calcute the key for. key calcuted key, should be freed with heim_ntlm_free_buf(). Returns: In case of success 0 is return, an errors, a errno in what went wrong. int heim_ntlm_ntlmv2_key (const void * key, size_t len, const char * username, const char * target, unsigned char ntlmv2[16]) Generates an NTLMv2 session key. Parameters: key the ntlm key len length of key username name of the user, as sent in the message, assumed to be in UTF8. target the name of the target, assumed to be in UTF8. ntlmv2 the ntlmv2 session key Returns: 0 on success, or an error code on failure. int heim_ntlm_verify_ntlm2 (const void * key, size_t len, const char * username, const char * target, time_t now, const unsigned char serverchallenge[8], const struct ntlm_buf * answer, struct ntlm_buf * infotarget, unsigned char ntlmv2[16]) Verify NTLMv2 response. Parameters: key the ntlm key len length of key username name of the user, as sent in the message, assumed to be in UTF8. target the name of the target, assumed to be in UTF8. now the time now (0 if the library should pick it up itself) serverchallenge challenge as sent by the server in the type2 message. answer ntlm response answer, should be freed with heim_ntlm_free_buf(). infotarget infotarget as sent by the server in the type2 message. ntlmv2 calculated session key Returns: In case of success 0 is return, an errors, a errno in what went wrong. Version 1.5.2 11 Jan 2012 Heimdal NTLM library(3)
All times are GMT -4. The time now is 12:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy