Bash: (foo==0)?foo=1:foo=0 valid?

Daniel B. Thurman dant at cdkkt.com
Sat Jul 2 17:45:52 UTC 2011


I seem to forget my shell programming
but is the following statement valid?

($foo==0)?foo=1:foo=0

I thought it was called the tristate conditional
operator but in any case I could not find it in
google.




More information about the users mailing list