ARG_MAX
| Shells
| whatshell
| portability
| permissions
| UUOC
| ancient
| -
| ../Various
| HOME
"$@"
| echo/printf
| set -e
| test
| tty defs
| tty chars
| $()
vs )
| IFS
| using siginfo
| nanosleep
| line charset
| locale
type
built-in for a function containing
a case
control structure The output of "type
" for a function also reports the content of its body.
For this purpose, the internal data structures are parsed again and a readable body
is regenerated.
However, particularly the output for a "case...esac
" control structure
is printed incorrectly in many versions.
The following call
f() { case W in X|Y|Z) : ;; *) : ;; esac; } type f
usually generates the following output for the body:
case WZ | Y | X):;;*):;;that is, the keywords "in" (including the surrounding blanks) and "esac" are missing. There's no data corruption, but the according statements for reassembling the output are just missing. As cosmetic difference, the order in the alternation is reversed.
Some implementations have been fixed, in different ways:
case W in Z | Y | X): ;; *): ;; esac
type
has been substituted by whatis
):
case W in Z|Y|X) : ;; *) : ;; esac
case W Z | Y | X) : ;; *) : ;; esac
However, SunOS 5 in turn (at least until 5.10) hasn't been fixed.