Re: possible bug in Bash 5.0

2019-12-25 Thread Eli Schwartz
On 12/25/19 5:41 PM, Xin Wu wrote: > Hi, > > I found the single-bracket [ ... ] and double-bracket [[ ... ]] behave > differently for string comparison in the follow simple Bash-script. > > # comma (,) is before two (2) in ASCII > a=,rst > b=2rst > if [ "$a" \> "$b" ]; then >   echo "single-brack

possible bug in Bash 5.0

2019-12-25 Thread Xin Wu
Hi, I found the single-bracket [ ... ] and double-bracket [[ ... ]] behave differently for string comparison in the follow simple Bash-script. # comma (,) is before two (2) in ASCII a=,rst b=2rst if [ "$a" \> "$b" ]; then echo "single-bracket" fi if [[ "$a" > "$b" ]]; then echo "double-bra