9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have 2 arrays of values for example
A1 ={10 15 3 21}
A2 ={10 15 3 22}
I need to check which one has greater values. However:
A1 ={10 15 3 21}
A2 ={10 15 3 21 3} - this one would be greater.
A1 ={10 15 5 21} - this one greater
A2 ={10 15 3 21}
Basically, I want to compare patch... (6 Replies)
Discussion started by: Jutsimitsu
6 Replies
2. Shell Programming and Scripting
I have 2 files say tp1.txt and tp2.txt having following data
cat tp1.txt
abc,2.20,IN20
acb,3.15,DN10
bca,3,RD10
cat tp2.txt
alv,1.00,IN20
aaa,4.05,DD10
abb,5.50,RD12
i want to compare the values on 2nd field of both the file, if value of first tp1.txt is greater than value... (3 Replies)
Discussion started by: ranabhavish
3 Replies
3. Shell Programming and Scripting
I need decimal comparing with if. Check if apache version is less than 2.2.17.
I tried this and not working.
#!/bin/bash
apachever=`/usr/local/apache/bin/httpd -v | head -1 | awk '{print $3}' |cut -d/ -f 2`
if ]; then
echo "Apache version less than 2.2.17"
else
... (7 Replies)
Discussion started by: anil510
7 Replies
4. UNIX for Dummies Questions & Answers
i need to do camparisions like the below.
For the case when first=10 and second=9.9 the scripts displays process failed.
I need to be able to convert the values to integer before doing the comparision.
Like 9.9 should be rounded over to 10 before doing comparision.
Please advice how can... (3 Replies)
Discussion started by: nehagupta
3 Replies
5. Shell Programming and Scripting
Hi All,
In my script I've written like this-
c=$( expr 100 / 3);echo $c
The output coming is 33. but I want to see 33.33, decimal values too. How to get that?
Thanks,
Naresh (3 Replies)
Discussion started by: NARESH1302
3 Replies
6. UNIX for Advanced & Expert Users
Hi All,
Is there any command which can convert binary decimal coded values to ascii values...
i have bcd values like below
оооооооооооо0о-- -v -
Pls suggest a way to convert this.
Thanks,
Deepti.Gaur (3 Replies)
Discussion started by: gaur.deepti
3 Replies
7. Shell Programming and Scripting
Hi,
I have a list of values from associative array from 0,..till 1.0000.
I tried various sort options; sort -g, sort -nr but it still couldnt work. In other words, the numbers are not sorted accordingly.
Please help.
Thanks. (1 Reply)
Discussion started by: ahjiefreak
1 Replies
8. Shell Programming and Scripting
Hi all,
I have a issue... Is it possible to compare integer value with decimal value.
If it is not possible,then how can i compare 2 decimal values in born shell.thanks! (3 Replies)
Discussion started by: MARY76
3 Replies
9. Shell Programming and Scripting
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)
Discussion started by: tmxps
5 Replies