Hi, I am in ksh88
I am trying to get the result of the calculation using 3 variables:
TOTAL
CAPACITY
and get the following error:
$DB_CAPACITY=(( $DB_SIZE * 100 / $TOTAL ))
ksh: syntax error: `((' unexpected
I cannot figure out what am I doing wrong... Thanks for any help -A (2 Replies)
Hi
am calculating the percentage of the pass and fail.
Pass:
echo `echo 1498*100/1667| bc`%
fail:
echo `echo 169*100/1667 | bc`%
for this am getting
PASS= 89%
fail =10 %
I need to fetch the exact decimal percentage like
PASS = 89.8 %
FAIL= 10.2 %
Please advice me (3 Replies)
Hi all
Already posted this question,i belive i didn't exactly said my question.
I have data files it stored in the different path like
/st/vr/sum.dat
/st/vr/pass.dat
/st/vr/fail.dat
we are not suppoe to mention the hardcode value of the path.
I need to calculate the percentage of... (10 Replies)
Hi All
I want to make summery for
Date=245Duration=545
Date=245Duration=10
Date=245Duration=278
Date=246Duration=30
Date=246Duration=178
Date=246Duration=414
Date=247Duration=17
Date=247Duration=281
Date=247Duration=9
Date=248Duration=968
Date=248Duration=550
Date=248Duration=1011... (1 Reply)
I have a file with over 100,000 lines of data with looking to compare times of about 2000 lines to get a total time of a process. The lines of unique data are as follows.
FINER: CacSoapServer:reserveNetworkResource got the sessionID
and
INFO: Created CAC session ID
The command... (5 Replies)
for i in `lsvg`
do
echo "VG Name:" $i
echo "Total VG Size:"
lsvg $i |grep "TOTAL PPs:" |awk '{print $7}' | cut -c2-
echo "Free VG Size:"
lsvg $i |grep "FREE PPs:" | awk '{print $7}' | cut -c2-
done
The PP Sizes are in MB. I like to have the sizes in GB.
Also, I like to have the... (14 Replies)
Hi Gurus,
I need to get one hour before time is yyyymmddhh format.
ex. date +"%Y%m%d%H" gives 2017052814 but I need 2017052813
Thankx
Please use CODE tags as required by forum rules! (6 Replies)
Discussion started by: nalakaatslt
6 Replies
LEARN ABOUT DEBIAN
devel::beginlift
Devel::BeginLift(3pm) User Contributed Perl Documentation Devel::BeginLift(3pm)NAME
Devel::BeginLift - make selected sub calls evaluate at compile time
SYNOPSIS
use Devel::BeginLift qw(foo baz);
use vars qw($i);
BEGIN { $i = 0 }
sub foo { "foo: $_[0]
"; }
sub bar { "bar: $_[0]
"; }
for (1 .. 3) {
print foo($i++);
print bar($i++);
}
no Devel::BeginLift;
print foo($i++);
outputs -
foo: 0 bar: 1 foo: 0 bar: 2 foo: 0 bar: 3 foo: 4
DESCRIPTION
Devel::BeginLift 'lifts' arbitrary sub calls to running at compile time - sort of a souped up version of "use constant". It does this via
some slightly insane perlguts magic.
import
use Devel::BeginLift qw(list of subs);
Calls Devel::BeginLift->setup_for(__PACKAGE__ => @list_of_subs);
unimport
no Devel::BeginLift;
Calls Devel::BeginLift->teardown_for(__PACKAGE__);
setup_for
Devel::BeginLift->setup_for($package => @subnames);
Installs begin lifting magic (unless already installed) and registers "${package}::$name" for each member of @subnames to be executed when
parsed and replaced with its output rather than left for runtime.
teardown_for
Devel::BeginLift->teardown_for($package);
Deregisters all subs currently registered for $package and uninstalls begin lifting magic is number of teardown_for calls matches number of
setup_for calls.
setup_for_cv
$id = Devel::BeginLift->setup_for_cv(&code);
Same as "setup_for", but only registers begin lifting magic for one code reference. Returns an id to be used in "teardown_for_cv".
teardown_for_cv
Devel::BeginLift->teardown_for_cv($id);
Deregisters begin lifting magic referred to by $id.
AUTHOR
Matt S Trout - <mst@shadowcatsystems.co.uk>
Company: http://www.shadowcatsystems.co.uk/ Blog: http://chainsawblues.vox.com/
LICENSE
This library is free software under the same terms as perl itself
perl v5.14.2 2012-04-22 Devel::BeginLift(3pm)