How can I convert the below shell script text snippet to use a ternary operator. I read at http://safari.oreilly.com/0131478230/ch11lev1sec5
that Linux does support a ternary operator, but I'm having trouble figuring out how to do it.
EXISTS=(text=="Apple") ? "Passed" : "Failed";
But because of the quirky syntax of Linux, I'm not sure how to convert it.
if [ $text = "Apple" ];