Quote (^thehatsrule^ @ Sep. 08 2007,16:09) |
No, they work. The version of bash is 2.x if memory serves. Perhaps you weren't using that or there's some kind of scripting error? EDIT: packages section shows 2.05b |
Quote (mikshaw @ Sep. 08 2007,22:43) |
I'm not sure why curly braces were used in that example. I can't recall ever seeing tests done that way. Any of these should work: if [ 23 == 23 ]; then echo "okay"; fi if [ 23 -eq 23 ]; then echo "okay"; fi if test 23 == 23 ; then echo "okay"; fi if test 23 -eq 23 ; then echo "okay"; fi test 23 == 23 && echo "okay" test 23 -eq 23 && echo "okay" [ 23 == 23 ] && echo "okay" [ 23 -eq 23 ] && echo "okay" |