Re: Bash: (foo==0)?foo=1:foo=0 valid?
- From: Joe Zeff <joe@xxxxxxx>
- Date: Sat, 02 Jul 2011 10:50:46 -0700
On 07/02/2011 10:45 AM, Daniel B. Thurman wrote:
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.
I don't know if it's allowed in bash, or any other shell. I do know,
however, that it's a valid construct in C.
--
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
- Follow-Ups:
- Re: Bash: (foo==0)?foo=1:foo=0 valid?
- From: Marko Vojinovic
- Re: Bash: (foo==0)?foo=1:foo=0 valid?
- References:
- Bash: (foo==0)?foo=1:foo=0 valid?
- From: Daniel B. Thurman
- Bash: (foo==0)?foo=1:foo=0 valid?
- Prev by Date: Bash: (foo==0)?foo=1:foo=0 valid?
- Next by Date: Re: Bash: (foo==0)?foo=1:foo=0 valid?
- Previous by thread: Bash: (foo==0)?foo=1:foo=0 valid?
- Next by thread: Re: Bash: (foo==0)?foo=1:foo=0 valid?
- Index(es):
Relevant Pages
|