05-07-2009
Can you calc the % for one of them? What is pmTotNoRrcConnectReqSucc and pmTotNoRrcConnectReq for the object 30011 ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how would you calculate percentage by per line? Given a column of 16 lines, grab each line and divide it by the sum of the entire column and multiply by 100?
thanks ... (8 Replies)
Discussion started by: rockiefx
8 Replies
2. Shell Programming and Scripting
Hi
I need a awk script to calculate percentage.
I have to pass the pararmeters in to the awk script and calculate the percentage.
Sum = 50
passed = 43
failed = 7
I need to pass these value in to the awk script and calculate the percentage.
Please advice me. (8 Replies)
Discussion started by: bobprabhu
8 Replies
3. Shell Programming and Scripting
I need a scripting AWK to compare 2 files.
file 1 and 2 are list of keywords
1 is
a
b
c
d
2 is
aa
aaa
b
bb
ccc
d
I want the AWK script to give us the number of times every keyword in file 1 occurs in file 2.
output should be
a 2 (7 Replies)
Discussion started by: anhtt
7 Replies
4. Shell Programming and Scripting
Need an awk script to calculate the percentage of value field and replace
I have a input file called file.txt with the following content:
john|622.5674603562933|8|br:1;cn:3;fr:1;jp:1;us:2
andy|0.0|12|**:3;br:1;ca:2;de:2;dz:1;fr:2;nl:1
in fourth filed of input file, calulate percentage of each... (1 Reply)
Discussion started by: veeruasu
1 Replies
5. UNIX for Dummies Questions & Answers
I have a input file called file.txt with the following content:
john|622.5674603562933|8|br:1;cn:3;fr:1;jp:1;us:2
andy|0.0|12|**:3;br:1;ca:2;de:2;dz:1;fr:2;nl:1
in fourth filed of input file, calulate percentage of each sub filed seperated by ; semicolon and replace value with percentage .
i... (11 Replies)
Discussion started by: veeruasu
11 Replies
6. Shell Programming and Scripting
Hi,
I have the following input in a file & need output as mentioned below(need counter of every occurance of field which is to be increased by 1).
Input:
919143110065
919143110065
919143110052
918648846132
919143110012
918648873782
919143110152
919143110152
919143110152... (2 Replies)
Discussion started by: siramitsharma
2 Replies
7. Shell Programming and Scripting
Hi,
Am trying to count the number of occurrences and then as a percentage from a log to troubleshoot errors, can someone help please
grep -o 'HTTP/1\.1\" 404 3..' access_log | wc -l
6 (5 Replies)
Discussion started by: dmccabe
5 Replies
8. Shell Programming and Scripting
i have a file say test with the below mentioned details
Folder Name Total space Space used
/test/test1 500.1GB 112.0 GB
/test/test2 3.2 TB 5TB
/test/test3 3TB 100GB
i need to calculate percentage of each row based on total space and space used and copy... (9 Replies)
Discussion started by: venkitesh
9 Replies
9. Shell Programming and Scripting
Hello, can someone guide me on this?
I don't know what is the best approach, (awk script, shell script)
I am using RedHat Linux version 6.5. There is a third party application deployed on that server. This app by default generates 5 log files and each file is 20MB. These log rollover... (5 Replies)
Discussion started by: ktisbest
5 Replies
10. HP-UX
having two columns, A and B.. i need to add another column C in a file and calculate the percentage based on the column A and B. (COLUMN B/ COLUMN A *100) . "|" is delimiter separating the A and B.. need C column with the percentage value. Thanks for your help
100|50 |50% ... (6 Replies)
Discussion started by: kartikirans
6 Replies
LEARN ABOUT DEBIAN
math::basecalc
Math::BaseCalc(3pm) User Contributed Perl Documentation Math::BaseCalc(3pm)
NAME
Math::BaseCalc - Convert numbers between various bases
VERSION
version 1.016
SYNOPSIS
use Math::BaseCalc;
my $calc = new Math::BaseCalc(digits => [0,1]); #Binary
my $bin_string = $calc->to_base(465); # Convert 465 to binary
$calc->digits('oct'); # Octal
my $number = $calc->from_base('1574'); # Convert octal 1574 to decimal
DESCRIPTION
This module facilitates the conversion of numbers between various number bases. You may define your own digit sets, or use any of several
predefined digit sets.
The to_base() and from_base() methods convert between Perl numbers and strings which represent these numbers in other bases. For instance,
if you're using the binary digit set [0,1], $calc->to_base(5) will return the string "101". $calc->from_base("101") will return the number
5.
To convert between, say, base 7 and base 36, use the 2-step process of first converting to a Perl number, then to the desired base for the
result:
$calc7 = new Math::BaseCalc(digits=>[0..6]);
$calc36 = new Math::BaseCalc(digits=>[0..9,'a'..'z']);
$in_base_36 = $calc36->to_base( $calc7->from_base('3506') );
If you just need to handle regular octal & hexdecimal strings, you probably don't need this module. See the sprintf(), oct(), and hex()
Perl functions.
METHODS
o new Math::BaseCalc
o new Math::BaseCalc(digits=>...)
Create a new base calculator. You may specify the digit set to use, by either giving the digits in a list reference (in increasing
order, with the 'zero' character first in the list) or by specifying the name of one of the predefined digit sets (see the digit()
method below).
If your digit set includes the character "-", then a dash at the beginning of a number will no longer signify a negative number.
o $calc->to_base(NUMBER)
Converts a number to a string representing that number in the associated base.
If "NUMBER" is a "Math::BigInt" object, "to_base()" will still work fine and give you an exact result string.
o $calc->from_base(STRING)
Converts a string representing a number in the associated base to a Perl integer. The behavior when fed strings with characters not in
$calc's digit set is currently undefined.
If "STRING" converts to a number too large for perl's integer representation, beware that the result may be auto-converted to a
floating-point representation and thus only be an approximation.
o $calc->digits
o $calc->digits(...)
Get/set the current digit set of the calculator. With no arguments, simply returns a list of the characters that make up the current
digit set. To change the current digit set, pass a list reference containing the new digits, or the name of a predefined digit set.
Currently the predefined digit sets are:
bin => [0,1],
hex => [0..9,'a'..'f'],
HEX => [0..9,'A'..'F'],
oct => [0..7],
64 => ['A'..'Z','a'..'z',0..9,'+','/'],
62 => [0..9,'a'..'z','A'..'Z'],
Examples:
$calc->digits('bin');
$calc->digits([0..7]);
$calc->digits([qw(w a l d o)]);
If any of your "digits" has more than one character, the behavior is currently undefined.
QUESTIONS
The '64' digit set is meant to be useful for Base64 encoding. I took it from the MIME::Base64.pm module. Does it look right? It's sure
in a strange order.
AUTHOR
Ken Williams, ken@forum.swarthmore.edu
COPYRIGHT
This is free software in the colloquial nice-guy sense of the word. Copyright (c) 1999, Ken Williams. You may redistribute and/or modify
it under the same terms as Perl itself.
SEE ALSO
perl(1).
perl v5.12.3 2011-05-16 Math::BaseCalc(3pm)