06-13-2006
Calculation - Result not accurate if numbe too big
Dear all,
Below is my script,
totalCount=57006427
totalSummCount=1207590
let percentageSumTmp1=${totalCount}-${totalSummCount}
let percentageSumTmp2=${percentageSumTmp1}*100
The expected result for percentageSumTmp2 should be (5579883700),
but when I execute the script in unix env i get 1284916404 ..
If I remove 1 digit number of the totalCount , then i able to get correct result
anyone , know how to fix it ?
Many thanks.
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
1 . Thanks everyone who read the post first.
2 . I have a log file which size is 143M , I can not use vi open it .I can not use xedit open it too.
How to view it ?
If I want to view 200-300 ,how can I implement it
3 . Thanks (3 Replies)
Discussion started by: chenhao_no1
3 Replies
2. Solaris
I have a Sun Ultra 5 that is running Solaris 8. I believe I meet the minimum requirements for Solaris 10 but the Ultra 5 is not on the HCL.
This will be my first ever Solaris upgrade so do I follow the HCL guidelines?
TiA (4 Replies)
Discussion started by: PapaPark
4 Replies
3. Programming
helo I have particular number
lets say 0x56
now thropugh c program how to check this number is hex or not
Regards,
Amit (4 Replies)
Discussion started by: amitpansuria
4 Replies
4. UNIX for Advanced & Expert Users
Hi Gurus,
The requirement is to collect the timestamp of soft links and collect it in a file in the following pattern:
This is the expected output:
Pattern:
MM/DD/YYYY hh:mi:ss filename
Example:
12/26/2008 10:31:09 <Filename>.zip
The closest way I could get was this:
ls... (8 Replies)
Discussion started by: jidsh
8 Replies
5. UNIX for Dummies Questions & Answers
I have a 5000 line config.log file with several "maybe" errors. Any reccomendations on finding solvable problems? (2 Replies)
Discussion started by: NeedLotsofHelp
2 Replies
6. Hardware
Hi all,
Does anybody know how to build a cycle accurate simulator? I've looked at QEMU and SESC simulator, but they are only cycle accurate for the CPU part. I'm looking for a simulator which can estimate the performance including CPU and I/O. For example, when I configure the simulator by SSD... (2 Replies)
Discussion started by: qqkk88
2 Replies
7. Shell Programming and Scripting
list db directory |grep alias |awk '{print "connect to ",$4}'
In a shell script the below line should display output as below
connect to <DATABASENAME>
but its throwing error like
Syntax Error The source line is 1.
The error context is
{print connect to,... (8 Replies)
Discussion started by: rocking77
8 Replies
8. Shell Programming and Scripting
Hi,
I have a file tp.txt having below data
CE2DD,N,5055,16.12.2013,3.114,12195.89,MVR,003388,Web::00000005055,Web Payment
and i am using below code to print the values
for var_amt_pay in `awk -F',' '{ arr += $6} END {for (i in arr) {print i "," arr } }' tp.txt`
do
... (2 Replies)
Discussion started by: ranabhavish
2 Replies
LEARN ABOUT DEBIAN
filter_mysqlbinlog
FILTER_MYSQLBINLOG(1p) User Contributed Perl Documentation FILTER_MYSQLBINLOG(1p)
NAME
filter_mysqlbinlog - Trimming ROLLBACK statements and equivalent BINLOG events added by mysqlbinlog. This script is now obsolete.
SYNOPSIS
mysqlbinlog binary_or_relay_log_file | filter_mysqlbinlog
Note that this script is now obsolete and not used by MHA by default.
DESCRIPTION
mysqlbinlog command provided by Oracle implicitly adds ROLLBACK statements and equivalent BINLOG events. But this causes problems when
recovering slave servers. To recover slaves, MHA might need to apply the following binlog events.
1) Relay log events from Relay_Log_Pos to the end of the relay log file
2) Differential relay log events from the latest slave
3) Differential binary log events from the dead master mysqlbinlog command needs to be executed on these files separately. If a
transaction does not end by 1) or 2), implicit ROLLBACK event rolls back the transaction, which will result in inconsistency.
filter_mysqlbinlog is a tool to fix this issue. Note that ROLLBACK statements themselves are added in usual situations. For example, when
you execute 1. BEGIN; 2. Updating transactional tables 3. Updating non-transactional tables 4. ROLLBACK, a ROLLBACK statement is written
to the binary log to rollback transactional queries. This is normal situation so filter_mysqlbinlog must not remove all ROLLBACK events.
Note that this script is now obsolete and not used by MHA by default.
perl v5.14.2 2012-01-08 FILTER_MYSQLBINLOG(1p)