syntax:ccmd:case

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
syntax:ccmd:case [2012/05/17 12:18]
ormaaj Misc cleanup. Add example.
syntax:ccmd:case [2012/07/31 10:56]
ormaaj [Portability considerations]
Line 89: Line 89:
 ===== Portability considerations ===== ===== Portability considerations =====
  
-  * Only the '';;''​ delimiter is specified by POSIX+  * Only the '';;''​ delimiter is specified by POSIX.
   * zsh and mksh use the '';​|''​ control operator instead of Bash's '';;&''​. Mksh has '';;&''​ for Bash compatability (undocumented).   * zsh and mksh use the '';​|''​ control operator instead of Bash's '';;&''​. Mksh has '';;&''​ for Bash compatability (undocumented).
-  * ksh93 has the '';&''​ operator, but not '';;&''​. +  * ksh93 has the '';&''​ operator, but no '';;&'' ​or equivalent
 +  * ksh93, mksh, zsh, and posh support a historical syntax where open and close braces may be used in place of ''​in''​ and ''​esac'':​ ''​case word { x) ...; };''​. This is similar to the alternate form Bash supports for its [[syntax/​ccmd/​classic_for | for loops]], but Bash doesn'​t support this syntax for ''​case..esac''​.
 ===== See also ===== ===== See also =====
-  * [[POSIX case conditional construct|http://​pubs.opengroup.org/​onlinepubs/​9699919799/​utilities/​V3_chap02.html#​tag_18_09_04_05]]+  * [[http://​pubs.opengroup.org/​onlinepubs/​9699919799/​utilities/​V3_chap02.html#​tag_18_09_04_05|POSIX case conditional construct]]
  
  • syntax/ccmd/case.txt
  • Last modified: 2017/02/08 15:04
  • by fgrose