|
|
IBM's /bin/sh is of the KornShell line and `select` is part of what its
scripts use, so the shell that replaces it has to have it. The menu goes
to stderr as "number TAB word", then PS3 (default "#? "); the answer is
read with the rules of `read REPLY`; a number in range picks that word,
anything else leaves the variable empty and the body still runs, a blank
line only prompts again, and end of input ends the loop.
The node is the `for` node with a `menu` flag, since the two differ only
in what the body sees. tests/zash/select.sh prints the same bytes under
zash and under the CBT /bin/sh; the specification has the rule.
|