bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash is not capable of comparing of strings and real numbers


From: pk
Subject: Re: bash is not capable of comparing of strings and real numbers
Date: Mon, 07 Dec 2009 22:22:38 +0000

phani krishna jampala wrote:

> bash is not capable of comparing of strings ( imean interms of lessthan or
> greater than etc) 

It is, if you use [[  ]]

a="abcd"
b="bcde"
if [[ "$b" > "$a" ]]; then
  echo "$b is greater than $a"
fi

> and real numbers ( the float values). 

True, but I can't really speak as to whether this is planned or not (I think 
it isn't, but of course I might be wrong).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]