Im trying to compare two numbers with decimals but its not working as expected.
When I do this it says that the numbers are equal. Ultimately Im using -le and -ge in the if statements but I tested with -eq for simplicity.
Any way to make this work? Im on Solaris 10.
Hi anyone,
i need to compare two decimal numbers
i thought that it could be do it with if but... :(
So, i'm writing in csh and i really apreciate if anyone can help me
if ( $ppl_kn <= $ppl_wb ) then
echo "############# KNdiscount model has the lowest perplexity"
set... (5 Replies)
Hi Gurus,
I wrote a small KSH script, in that i am comparing two variables like this
curr_time = date +%h.%m
set_time=23.55
If ];
then
zip the file
fi
The above script is croned to run evey 5(3,8,.......,58) minutes, but it is zipping at 23.03 hours. My intention is at 23.58 .what... (4 Replies)
How can i devide decimal numbers?
I am getting this kind of error:
line 18: 200.2/40.234: syntax error in expression (error token is ".2/40.234")
What can i do to work around this problem?
Thanks for any advice. (4 Replies)
Hi friends
How can I use "for loop" for decimal numbers?
ex: 0.1 < x < 0.6
I used this commands but does'nt work.
LIMIT=0.6
for ((x=0.1; x<=LIMIT; x++))
do
-
-
-
done
Many thanks (1 Reply)
Hello...
I am new to unix and I am wondering if in a C-shell script , Are we supposed to use only whole numbers........ for example..if a program needs to calculate the average of some numbers........
@ avg = (($1 +$2 + $3)/3)) is returning a whole number.........How can a decimal be... (7 Replies)
Hi experts,
My number output has somehting like below
filename /temp
0.23
10.23
How do i put a condition to the above numbers?
e.g
if then
the . seem to give me problems. Pls help.
thanks
---------- Post updated at 05:25 PM ---------- Previous update was at 05:23 PM... (9 Replies)
For numbers between 0 and 1 the below logic is not working.
Output of above shall be "correct" but its echoing "incorrect".Kindly suggest
a=.1
if
then
echo correct
else echo incorrect
fi
Video tutorial on how to use code tags in The UNIX and Linux Forums. (3 Replies)
Hello,
I am having a problem when i execute following script on RHEL 6.4. Same script works fine on another machine where I have same version of RHEL and KSH.
Below is the rpm and RHEL version.
ossvm12(0)> rpm -qa | grep ksh
ksh-20100621-19.el6.x86_64
ossvm12(0)> cat... (7 Replies)
Hi!
I found and then adapt the code for my pipeline...
awk -F"," -vOFS="," '{printf "%0.2f %0.f\n",$2,$4}' xxx > yyy
I add -F"," -vOFS="," (for input and output as csv file) and I change the columns and the number of decimal...
It works but I have also some problems... here my columns
... (7 Replies)
Discussion started by: echo manolis
7 Replies
LEARN ABOUT DEBIAN
html::template::plugin::dot::helpers
HTML::Template::Plugin::Dot::Helpers(3pm) User Contributed Perl Documentation HTML::Template::Plugin::Dot::Helpers(3pm)NAME
HTML::Template::Plugin::Dot::Helpers - Add useful objects to your templates
VERSION
Version 0.04
SYNOPSIS
use HTML::Template::Plugin::Dot::Helpers;
Then in your template, you can do:
<tmpl_var Number.format_currency(orderitem.price)>
DESCRIPTION
This helper class adds some useful objects to your Dot-enabled templates (see HTML::Template::Plugin::Dot).
Added objects
Number
An extended Number::Format object. See Number::Format for documentation. Note that only the object oriented methods are supported
here.
I've added several generic numerical methods. Most (well, all in this release) are boolean methods, useful in "<tmpl_if>s". They are:
equals - test whether two numbers are equal (==)
le, lt, ge, gt - test how two numbers compare
(implemented with <=, <, >=, > respectively)
The following is not yet implemented.
String
Adds generic string testing functions similar to the above:
equals - test whether two strings are equal (eq)
le, lt, ge, gt - test how two strings compare lexically
AUTHOR
Rhesa Rozendaal, "<rhesa@cpan.org>"
BUGS
Please report any bugs or feature requests to "bug-html-template-plugin-dot-helpers@rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Template-Plugin-Dot-Helpers>. I will be notified, and then you'll automatically be
notified of progress on your bug as I make changes.
ACKNOWLEDGEMENTS COPYRIGHT & LICENSE
Copyright 2005 Rhesa Rozendaal, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2011-01-04 HTML::Template::Plugin::Dot::Helpers(3pm)