2009-12-07, 22:22(+00), pk: > 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 [...]
Or the "[" (aka test) builtin: [ "%b" \> "$a" ] -- Stéphane