03-15-2010
Use "bc -l" for floating point result, but for actually retaining proper scale you would need to use printf.
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. Shell Programming and Scripting
please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
4. Shell Programming and Scripting
I've been able to generate output based on the code scarfake provided me (thanks again man).
A little background so everyone more or less knows whats going on:
I needed code that would propagate a database with 100,000 entries, for capacity testing purposes, something like a stress test.
... (5 Replies)
Discussion started by: ogoy
5 Replies
5. Shell Programming and Scripting
Hi, i wish to learn unix commands and shell scripting.
platform is solaris. but i am focused more on handy unix commands than system administration.
which books do you recommend? (1 Reply)
Discussion started by: nurulamin862
1 Replies
6. UNIX for Dummies Questions & Answers
Hello Experts,
I have the following questions to be discussed here at this esteemed discussion forum.
I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
Discussion started by: faizsaadq
1 Replies
7. Shell Programming and Scripting
Hi ,
Please excuse me for opening a new thread i am unable to find out the syntax error
in my if else condition inside for loop in awk command ,
my actual aim is to print formatted html td tag when if condition (True) having string as "failed",
could anyone please advise what is the right... (2 Replies)
Discussion started by: karthikram
2 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