Hi all,
In KSH, I have got an error message like,
"expr: Integer argument too large"
I received this error message when I mutiply two large values and displaying the resultant output.
Is there any other altenative way to go with too large values?
Kindly let me know asap...
Thanks in... (12 Replies)
i got a file called Marks
The format of Marks is:
12345678 5 7
23456789 7 9 3
What can i do with a loop, read expr and echo command to produce a new file like below:
12345678:12
23456789:20
and also when we adding fewer than 3 value with expr, we need to change any null value for... (13 Replies)
i wrote this simple shell script
#!/bin/bash
read N1
read N2
expr $N1 + $N2
it work fine in bash and i add it on xinetd for some test but when i try to use in with telnet i got this error :
ehsan@debian:~$ telnet 192.168.1.4 1234
Trying 192.168.1.4...
Connected to 192.168.1.4.... (14 Replies)
Newb here
echo "$yesterdaysclose"
echo "$close"
if ; then
echo "stocks moving up"
elif ; then
echo "stock is moving down"
else
echo "no change"
fi
seems to evaluate the floating decimal correctly however returns
./shellscript1.sh: line 17: [: : integer expression expected... (3 Replies)
Hi,
I have placed the script and running successfully on AIX
However in Linux it throws integer expression expected
Could some one please help me to fix this
MaxThreshold4alert=`echo "$MaxCapacitycnt*(80/100)" |bc -l`
echo $MaxThreshold4alert
Error:
40.00000000000000000000: integer... (2 Replies)
Hi,
I am new to shell/bash script. I am trying to run below script
#!/bin/bash
a=0
b=10
if
then
echo "a is equal to be"
else
echo "a is not equal to be"
fi
MAX=10
while
do
echo $a
a='expr $a + 1'
done (1 Reply)
This is my code.... It works correct, but does not work with 4 and 5. My program is about finding average. so when i run 4 5 it gives me error "expr: non-integer argument".
But when i say sh average 45 67 it works. Whats wrong?how to fix it?
sum=0
n=0
if
then
for i in $*
do
if
... (2 Replies)
Hi,
I am getting the below error while comparing the month of a file to current month.
I am using ls -lrth to get the month of that file and while using the if else condition i am getting the below error..
a1=`ls -lrth abc.txt | awk '{print substr($6,1,3)}'`
This gives me the month from... (1 Reply)
Hello ,
This is the piece of the code which is giving me trouble
if ;then
exit_proc "${SOURCEDIR}/${OUT_FILE} does not exists or not readable" 2
else
word_count=`wc -l < ${SOURCEDIR}/$OUT_FILE`
fi
if ;then
exit_proc "Word_count is more than allowed limit" 1
else... (6 Replies)
Discussion started by: Sri3001
6 Replies
LEARN ABOUT DEBIAN
ppix::editortools::introducetemporaryvariable
PPIx::EditorTools::IntroduceTemporaryVariable(3pm) User Contributed Perl Documentation PPIx::EditorTools::IntroduceTemporaryVariable(3pm)NAME
PPIx::EditorTools::IntroduceTemporaryVariable - Introduces a temporary variable using PPI
SYNOPSIS
my $munged = PPIx::EditorTools::IntroduceTemporaryVariable->new->introduce(
code => "use strict; BEGIN {
$^W = 1;
}
my $x = ( 1 + 10 / 12 ) * 2;
my $y = ( 3 + 10 / 12 ) * 2;
",
start_location => [ 2, 19 ],
end_location => [ 2, 25 ],
varname => '$foo',
);
my $modified_code_as_string = $munged->code;
my $location_of_new_var_declaration = $munged->element->location;
DESCRIPTION
Given a region of code within a statement, replaces all occurrences of that code with a temporary variable. Declares and initializes the
temporary variable right above the statement that included the selected expression.
METHODS
new()
Constructor. Generally shouldn't be called with any arguments.
find( ppi => PPI::Document, start_location => Int, end_location => Int, varname => Str ) =item find( code => Str, start_location => Int,
end_location => Int, varname => Str )
Accepts either a "PPI::Document" to process or a string containing the code (which will be converted into a "PPI::Document") to
process.
Given the region of code specified by start_location and end_location, replaces that code with a temporary variable with the name given
in varname (defaults to "tmp"). Declares and initializes the temporary variable right above the statement that included the selected
expression.
Returns a "PPIx::EditorTools::ReturnObject" with the modified code as a string available via the "code" accessor (or as a
"PPI::Document" via the "ppi" accessor), and the "PPI::Token" where the new variable is declared available via the "element" accessor.
Croaks with a "no token" exception if no token is found at the location. Croaks with a "no statement" exception if unable to find the
statement.
SEE ALSO
This class inherits from "PPIx::EditorTools". Also see App::EditorTools, Padre, and PPI.
perl v5.14.2 2012-03-11 PPIx::EditorTools::IntroduceTemporaryVariable(3pm)