Sponsored Content
Top Forums UNIX for Advanced & Expert Users Summation of the column value in an interval. Post 302317065 by varungupta on Monday 18th of May 2009 03:14:09 AM
Old 05-18-2009
Summation of the column value in an interval.

Hey,

I have a file with following data..
and I want to get the summation of 10th column. And this happens in every 10 seconds for a minute max.

242001 A mqsitst 794864 1249516 0 60 20 293050400 77016 * 02:05:33 - 0:04 DataFlowEngine EAITIBR2_BROKER 384403e1-1001-0000-0080-cc759314a02e IDS_CCASS 0
242001 A mqsitst 978998 1249516 0 60 20 24284a400 56092 * 02:05:33 - 0:03 DataFlowEngine EAITIBR2_BROKER 9fa202e1-1001-0000-0080-cc759314a02e 21CD1 0
242001 A mqsitst 1040482 1134684 0 60 20 13d86400 78684 * 02:05:35 - 0:04 DataFlowEngine EAIDQBR2_BROKER 6f8aa7d6-1001-0000-0080-be57c7f1134d WAMS1 0

The BOLD faced has to be added and its in the 10th column.

What should i do to make it easily done ?

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to perfrom summation for particular delimited field?

Hi, Please help to share your thought about how to perfrom summation for particular delimited field, and output to the particular file based on -rw-r--r-- 1 abc other 3094 Oct 19 09:40 0132019832-ps5_online_cdrm.unl -rw-r--r-- 1 abc other 1588 Oct 19 09:47... (2 Replies)
Discussion started by: rauphelhunter
2 Replies

2. Shell Programming and Scripting

compare the interval of 2 numbers of input2with interval of several numbers of input1

Help plz Does any one have any idea how to compare interval ranges of 2 files. finding 1-4 (1,2,3,4) of input2 in input1 of same key "a" values (5-10, 30-40, 45-60, 80-90, 100-120 ). Obviously 1-4 is not one of the range with in input1 a. so it should give out of range. finding 30-33(31,32,33)... (1 Reply)
Discussion started by: repinementer
1 Replies

3. UNIX for Dummies Questions & Answers

summation of values coming in a row.

Hi All, I need 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... (1 Reply)
Discussion started by: MrGopal666
1 Replies

4. Shell Programming and Scripting

How to shift values in new column after certain interval?

Hello everyone, my data is in a format as below a a a a a a a a a a a a a a a (8 Replies)
Discussion started by: jojo123
8 Replies

5. Shell Programming and Scripting

Summation of column value in flat file

Hello Guys Please find my below requirement I have a flat file with column headers in first line and data The structure like below col1 col2 col3 A 1 2 B 3 4 C 5 6 Say I have to take the summation of col2 (that will depend on the... (2 Replies)
Discussion started by: Pratik4891
2 Replies

6. Shell Programming and Scripting

calculating column summation in a directory of flat files

Hello Guru s I need your kind help to solve my below issue I have a directory of flat files and have to calculate sum of some columns from the flat file . Say for flat file 302 I need the column summation of 2 and 3 rd column For flat file 303 I need the column summation of 5 and... (2 Replies)
Discussion started by: Pratik4891
2 Replies

7. Shell Programming and Scripting

Awk - Summation in Proper decimal Format

Hi I am executing below command to do summation on 46th coloumn. cat File1| awk -F"|" '{p += $46} END { printf"Column Name | SUM | " p}' I am getting output as Column Name | SUM | 1.01139e+10 Here I want output in Proper decimal format. Can someone tell me what change is required for same? (1 Reply)
Discussion started by: sanranad
1 Replies

8. Shell Programming and Scripting

Modification of Summation Script

hi guys, i have a script that basically just sums up the values of 2 particular columns in a file, grouped by the columns specified as well The script is quite long, but it's basically just repetitive.. just for each condition. This script only accepts one type of input file. ... (22 Replies)
Discussion started by: ramneim
22 Replies

9. Shell Programming and Scripting

Summation of a particular column which are in different folders

I have three folders named f1, f2 and f3. The file names are same in all these folders. I would like to get the summation of the second column from all files. How can I do this ? file1 in f1 folder 143 143.69 60.2 81.30 40.4 62.39 166.3 83.38 107.2 60.30 37.5 144 192.62 107.9... (3 Replies)
Discussion started by: edisonjoe
3 Replies

10. UNIX for Beginners Questions & Answers

Awk/sed summation of one column based on some entry in first column

Hi All , I am having an input file as stated below Input file 6 ddk/djhdj/djhdj/Q 10 0.5 dhd/jdjd.djd.nd/QB 01 0.5 hdhd/jd/jd/jdj/Q 10 0.5 512 hd/hdh/gdh/Q 01 0.5 jdjd/jd/ud/j/QB 10 0.5 HD/jsj/djd/Q 01 0.5 71 hdh/jjd/dj/jd/Q 10 0.5 ... (5 Replies)
Discussion started by: kshitij
5 Replies
UNICONV(1)							  LINUX COMMANDS							UNICONV(1)

NAME
uniconv - convert text to native formats through unicode SYNOPSIS
uniconv -out output-file [ -decode input-encoding ] [ -encode output-encoding ] [ input-file ] [ -todos ] [ -fromdos ] [ -tomac ] [ -from- mac ] DESCRIPTION
uniconv program decodes scripts with a certain encoding encodes them with some other encoding. The scipt is a 16,8 or 7 bit-byte stream. The converted text will be sent to the standard output, even in case of 16-bit encodings,unless the output file is specified by the -out option. The -decode and -encode options are optional, the default converter is utf-8. The program reads the Unicode map helper files (*.my) from the default directory /usr/share/data. Simple 1-to-1 encodings can be added on the fly by adding a a my-file, or setting your yudit.data- path property in ~/.yudit/yudit.properties or /usr/share/yudit/config/yudit.properties. By default /usr/share/yudit/data is searched. My-files can be created by a program called The files can be converted between dos/unix/mac line-ending variants with -fromdos, -frommac, -todos, -tomac options. the default (not scpecified one) is Unix. makeumap. ENCODING
If you received this program through the Yudit distribution, then as of today you can convert between the encodings below. utf-8 Yudit recommends this format for international information exchange. ASCII text will get through intact, while other unicode characters will get their 8th bit set and the length of the code will depend on how far away they are in the Unicode space. This is the only transformation format that can encode both 16-bit (ucs-2) and 31-bit (ucs-4) unicode. utf-8-s Hackers utf-8 format - it does not give an error message when a surrogate pair is decoded and it can encode a surrogate pair 'as is'. This is not a recommended encoding format although this format is used to encode/decode clipboard data, in order to preserve input. utf-16 Although 16 is bigger than 8 this is still a compromise required by OSes like Windows that can not handle ucs-4 - this encoding pro- duces 16-bit unicode streams. In addition to BMP it can convert 16 planes using the Unicode Surrogate Area. This encoding can not convert anything above U+10FFFF (Plane 16). The input byte order is recognized by the first two characters BEM (byte-order-mark) U+FEFF. This format is used in Windows NT for documents like notepad .txt files. utf-16-be Big endian utf-16 converter. utf-16-le Littlen endian utf-16 converter. utf-7 This is the recommended format for international information exchange, when 7-bit can only be used. It can only handle 16-bit (utf-16) unicode, for ucs-4 (above U+10FFFF) you should use utf-8 encoding. iso-8859-1 This is the ISO 8859-1 character encoding format. It is also known as "Latin-1" encoding. iso-8859-2 This is the ISO 8859-2 character encoding format. It is also known as "Central European" encoding. iso-8859-5 This is the ISO 8859-5 character encoding format. It is also known as "Cyrillic" encoding. iso-8859-7 This is the ISO 8859-7 character encoding format. It is also known as "Greek" encoding. iso-8859-9 This is the ISO 8859-9 character encoding format. It is also known as "Turkish" encoding. koi8-r This is the KOI8-R character encoding format. It is mainly used in Russia. cp-1251 This is the CP1251 cyrillic character encoding format. It is mainly used in Microsoft Windows and some web sites. iso-2022-jp This is a Japanese character encoding format. It is a 7-bit encoding format. iso-2022-jp-3 This is a Japanese character encoding format. It is a 7-bit encoding format. It is base upon JIS X 0213 standard. euc-jp This is a Japanese character encoding format. It is an 8-bit encoding format. Mainly used in UNIX systems. euc-jp-3 The official name is EUC-JISX0213 - I just could not read this. This is a Japanese character encoding format. It is a 8-bit encod- ing format. It is base upon JIS X 0213 standard. shift-jis This is a Japanese character encoding format. It is an 8-bit encoding format. Mainly used in MSDOS/Windows. shift-jis-3 The official name is Shift_JISX0213 - I just could not read this. This is a Japanese character encoding format. It is an 8-bit encoding format. Mainly used in MSDOS/Windows. iso-2022-jp This is a Japanese 7-bit character encoding format. The iso-2022-jp email messages can be decoded/encoded are in this format. iso-2022-x11 This is a Japanese character encoding format. It is also known as "COMPOUND_TEXT" encoding for the X Window System. This is a 7-bit encoding format. It can be derived from the ISO 2022-JP format with some differences. ksc-5601-x11 This is a Korean character encoding format used by the X window system(COMPOUND_TEXT encoding) to encode Korean(KS X 1001) and US-ASCII. This is a 7bit encoding format compliant to ISO-2022 specification for encoding of multiple character sets. Please, note that this is DIFFERENT from ISO-2022-KR (defined in IETF RFC 1557). euc-kr This is an 8bit multibyte encoding for Korean. It encodes US-ASCII(7bit) in single byte range and characters in KS X 1001(for- merly KS C 5601) in double byte range with MSB on(8bit). It's used in Unix and Internet. Korean version of MS-DOS, MacOS and MS- Windows use compatible (most cases, identical) variant of this encoding. johab This is a Korean encoding specified in KS X 1001(KS C 5601-1992), Annex 3 as a supplementary encoding. Widely used in Korean MS-DOS until mid-1990's. It can encode all Hangul syllables(11,172) of modern Korean as well as all the special symbols and Hanja (Chinese ideograms used in Korea) defined in KS X 1001. uhc A variant of EUC-KR used in Korean MS-Windows 95/98(proprietary encoding of Microsoft,CP949). Its character repertoire includes all modern syllables of Hangul,Korean script as well as all the special symbols and Hanja (Chinese ideograms used in Korea) defined in KS X 1001. gb-18030 This is a Chinese character encoding format based upon GB 18030. It encodes the whole U+0000..U+10FFFF range, while being compati- ble with gb-2312. gb-2312-x11 This is a Chinese character encoding format based upon GB 2312. It is a 7-bit encoding format. gb-2312 This is a Chinese character encoding format based upon GB 2312. It is an 8-bit encoding format. big-5 This is a Chinese character encoding format based upon BIG5 encoding. It is an 8-bit encoding format. hz This is a Chinese character encoding format based upon "Hanzi" encoding. It is a 7-bit encoding format. viscii This is a Vietnamese character encoding format. ucs-2-be This converts 16-bit unicode (ucs-2) streams. The format takes care of big-endian variant. Yudit does not recommend this format. ucs-2-le This converts 16-bit unicode (ucs-2) streams. The format takes care of little-endian variant. Yudit does not recommend this format. ucs-2 This converts 16-bit unicode (ucs-2) streams. The input byte order is recognized by the first two characters BEM (byte-order-mark) U+FEFF. Yudit does not recommend this format. java This converts uxxxx character escapes. When encoding, all characters above U+0080 will be escaped with a string like 'u0080'. When decoding the same format is decoded but, in addition, utf-8 format is also recognized, so it can also be used to recover data acci- dentally saved with the wrong enconding. The U+10000..U+10FFFF area is converted to surrogates and vice versa. java-s This converts uxxxx character escapes. When encoding, all characters above U+0080 will be escaped with a string like 'u0080'. When decoding the same format is decoded but, in addition, utf-8 format is also recognized, so it can also be used to recover data acci- dentally saved with the wrong enconding. Surrogates are not treated specially during conversion - this is why it is not a recommened conversion. FILES
~/.yudit/yudit.properties or /usr/share/yudit/config/yudit.properties can have yudit.datapath property. This is where the map files are kept. By default /usr/share/yudit/data is searched. SEE ALSO
makeumap AUTHOR
This program was written by gsinai@yudit.org (Gaspar Sinai), Tokyo, 2 January, 2001. LINUX COMMANDS
Nov 5 1997 UNICONV(1)
All times are GMT -4. The time now is 09:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy