05-26-2008
Jaduks, yes that is the expected output.
danmero, that code did it, strange now that I see 0's in the results, goes to show that we need to put more stress into the tests!
Thanks guys
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello guys!
Can say me anybody about operatios with unix, I don't to make operations, only inside in a variable, like this
#y=4
#x=2
#let z=$y-$x
#echo $z
# 2
but I can't to make mathematical operations with decimal like this
#y=3.2
#x=1.5
#let z=$y-$x
#echo $z
# 3
this... (2 Replies)
Discussion started by: cesar720213
2 Replies
2. UNIX for Dummies Questions & Answers
Hi Friends,
I am new to shell scripting and a trying to work this out.
I have a variable called $number.
The value in this variable is 10
I want to display $number - 2 in a mail. The result would be 8
eg.
mail -s 'subject' user <<eof
the result of your calculation is $number - 2... (2 Replies)
Discussion started by: sureshy
2 Replies
3. UNIX for Dummies Questions & Answers
I've just installed redhat 6.2 on one of my systems and am trying to install the gcc c compiler after downloading an rpm from the redhat site. The damn thing gives me:
only major numbers <= 3 are supported by this version of RPM
what do I do, it does the same with the latest rpm of php
... (7 Replies)
Discussion started by: knmwt15000
7 Replies
4. Shell Programming and Scripting
Hi everyone,
I have a requirement that requires me to fill an sqlite database with 100,000 entries (no duplicates).
I will start out by giving the command that will insert the values necessary to populate the database:
# sqlite /var/local/database/dblist "insert into list... (2 Replies)
Discussion started by: ogoy
2 Replies
5. UNIX for Dummies Questions & Answers
:eek: (1 Reply)
Discussion started by: Kevinfine
1 Replies
6. Shell Programming and Scripting
Hello all!
I used to use expr for doing simple mathematics, but has a main advantage and a main disadvantage:
The advantage is that it can take variables for numbers
(e.g.{1}: echo "Give me first"
read lol
echo "Give other"
read lil
sum=`expr $lol + $lil`
echo "The sum of $lol and $lil =... (5 Replies)
Discussion started by: hakermania
5 Replies
7. Shell Programming and Scripting
I am writing a bash script to automate the installation of web environment on a base install of Fedora. And I'm at the limit of my last nerve and my bash skills. My brain is screaming at me: "Give up and use perl", but I am trying to stick to bash since the script will modify the perl environment... (6 Replies)
Discussion started by: lbe
6 Replies
8. What is on Your Mind?
I have added a new experimental "Computer Science and Mathematics Trivia - True or False" section in the discussions, currently under the tags box.
In the future, I plan to
Expand this feature to add more trivia categories from math, science and technology.
Keep track of correct and... (20 Replies)
Discussion started by: Neo
20 Replies