Reserved words in the Korn shell or POSIX shell

The following reserved words have special meaning to the Korn shell or POSIX shell.

!         case    do
done      elif    else
esac      fi      for
function  if      in
select    then    time
until     while   { 
}         [[      ]]

The reserved words are recognized only when they appear without quotation marks and when the word is used as the following:

  • First word of a command
  • First word following one of the reserved words other than case, for, or in
  • Third word in a case or for command (only in is valid in this case)