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




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.


--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines



Relevant Pages

  • Re: Bash: (foo==0)?foo=1:foo=0 valid?
    ... I seem to forget my shell programming ... but is the following statement valid? ... since within an expression the '$' to reference a variable is optional: ... To unsubscribe or change subscription options: ...
    (Fedora)
  • Re: Bash: (foo==0)?foo=1:foo=0 valid?
    ... I seem to forget my shell programming ... but is the following statement valid? ... To unsubscribe or change subscription options: ... Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines ...
    (Fedora)
  • Re: Bash: (foo==0)?foo=1:foo=0 valid?
    ... I seem to forget my shell programming ... but is the following statement valid? ... To unsubscribe or change subscription options: ... Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines ...
    (Fedora)
  • Re: Bash: (foo==0)?foo=1:foo=0 valid?
    ... On Saturday 02 July 2011 18:50:46 Joe Zeff wrote: ... but is the following statement valid? ... To unsubscribe or change subscription options: ... Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines ...
    (Fedora)
  • Re: Bash: (foo==0)?foo=1:foo=0 valid?
    ... but is the following statement valid? ... google. ... echo $?1:0)) ... To unsubscribe or change subscription options: ...
    (Fedora)