Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script to Count the Numeric Values and get the Total Post 302770972 by Padmanabhan on Tuesday 19th of February 2013 08:12:17 AM
Old 02-19-2013
Thanks... I am a newbie....

---------- Post updated at 06:42 PM ---------- Previous update was at 06:20 PM ----------

Quote:
Originally Posted by pamu
Please use code tags for code and data sample.
And before posting any question first try to search in the forums Smilie
Try
Code:
awk '{a+=$NF}END{print a}' file


Thank you very much, It worked like a charm... But It shows only a Total value. I need the Output like

Code:
Overall Total Proccessed = 'Total value'

Thanks in advance.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help in shell script to trim numeric values

Hello I am currently working on a shell script which actually needs to pull some file from a server , The filenames will have the extension with date/time stamp , i need to trim that and name it to proper format Example : xyz_20091108_22142365.gzip i need to remove the... (5 Replies)
Discussion started by: ranga27
5 Replies

2. Shell Programming and Scripting

Count the alpha numeric

Hi all. This is one of my interview question. input : apple output : a - 1 p - 2 l - 1 e - 1 i written the code like this echo "apple" | fold -w1 | sort | uniq -c | awk '{print $2 "-->" $1}' is any other way to do ? (5 Replies)
Discussion started by: itkamaraj
5 Replies

3. Shell Programming and Scripting

perl script on how to count the total number of lines of all the files under a directory

how to count the total number of lines of all the files under a directory using perl script.. I mean if I have 10 files under a directory then I want to count the total number of lines of all the 10 files contain. Please help me in writing a perl script on this. (5 Replies)
Discussion started by: adityam
5 Replies

4. Shell Programming and Scripting

Help with script to read lines from file and count values

Hi, I need some help with a script I'm trying to write. I have a log file containing references to a number of different webservices. I wish to write a script that will list the webservices with a count as to how many times they appear in the log. An example of the log file content: ... (2 Replies)
Discussion started by: gman2010
2 Replies

5. Shell Programming and Scripting

Use AWK to check for numeric values? (BASH script)

Hi, I'm quite new to scripting, but know a few AWK statements. I have the following line in my script: hostname=`echo $file | awk 'BEGIN{FS=OFS="."}{$NF=""; NF--; print}'` I use this in my script to rename files, which are similar to this: name.mvkf.mkvfm.mkfvm.1 To the... (4 Replies)
Discussion started by: TauntaunHerder
4 Replies

6. Shell Programming and Scripting

Total Count using AWK

Hi Everybody, I have the following example file... 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1... (8 Replies)
Discussion started by: sraj142
8 Replies

7. AIX

Pattern count for numeric values in aix

Hi All , I have a small code that checks pattern of digits entered in unix mode . $ echo 201202 | wc -c 7 /* output*/ When i run same command in AIX 5.1 , i am getting output with some initial blanks $ echo 201202 | wc -c 7 ... (4 Replies)
Discussion started by: Perlbaby
4 Replies

8. UNIX for Dummies Questions & Answers

In ls -l remove total count

Hi All, When i give ls -ltr i get 'total 10' like this along with files long listing. is there any option in ls command to remove this line or do we need use head -1 command only. $ls -ltr total 45 -rw-r--r-- 1 abc g1 0 Jul 17 07:20 0 -rw-r--r-- 1 abc g1 744 May 9 12:10 a -rw-r--r--... (1 Reply)
Discussion started by: HemaV
1 Replies

9. Shell Programming and Scripting

Finding total distinct count from multiple csv files through UNIX script

Hi All , I have multiple pipe delimited csv files are present in a directory.I need to find out distinct count on a column on those files and need the total distinct count on all files. We can't merge all the files here as file size are huge in millions.I have tried in below way for each... (9 Replies)
Discussion started by: STCET22
9 Replies
wxControlWithItems(3erl)				     Erlang Module Definition					  wxControlWithItems(3erl)

NAME
wxControlWithItems - See external documentation: wxControlWithItems. DESCRIPTION
See external documentation: wxControlWithItems . This class is derived (and can use functions) from: wxControl wxWindow wxEvtHandler DATA TYPES
wxControlWithItems() : An object reference, The representation is internal and can be changed without notice. It can't be used for comparsion stored on disc or distributed for use on other nodes. EXPORTS
append(This::wxControlWithItems(), Item::string()) -> integer() See external documentation . append(This::wxControlWithItems(), Item::string(), ClientData::term()) -> integer() See external documentation . appendStrings(This::wxControlWithItems(), Strings::[[string()]]) -> ok See external documentation . clear(This::wxControlWithItems()) -> ok See external documentation . delete(This::wxControlWithItems(), N::integer()) -> ok See external documentation . findString(This::wxControlWithItems(), S::string()) -> integer() Equivalent to findString(This, S, []) . findString(This::wxControlWithItems(), S::string(), Options::[Option]) -> integer() Types Option = {bCase, bool()} See external documentation . getClientData(This::wxControlWithItems(), N::integer()) -> term() See external documentation . setClientData(This::wxControlWithItems(), N::integer(), ClientData::term()) -> ok See external documentation . getCount(This::wxControlWithItems()) -> integer() See external documentation . getSelection(This::wxControlWithItems()) -> integer() See external documentation . getString(This::wxControlWithItems(), N::integer()) -> string() See external documentation . getStringSelection(This::wxControlWithItems()) -> string() See external documentation . insert(This::wxControlWithItems(), Item::string(), Pos::integer()) -> integer() See external documentation . insert(This::wxControlWithItems(), Item::string(), Pos::integer(), ClientData::term()) -> integer() See external documentation . isEmpty(This::wxControlWithItems()) -> bool() See external documentation . select(This::wxControlWithItems(), N::integer()) -> ok See external documentation . setSelection(This::wxControlWithItems(), N::integer()) -> ok See external documentation . setString(This::wxControlWithItems(), N::integer(), S::string()) -> ok See external documentation . setStringSelection(This::wxControlWithItems(), S::string()) -> bool() See external documentation . AUTHORS
<> wxErlang 0.98.9 wxControlWithItems(3erl)
All times are GMT -4. The time now is 03:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy