Article pages now have a discussion option at the bottom (moderated/captcha, but no registration needed)

User selections

Synopsis

select <NAME>; do
  <LIST>
done
select <NAME> in <WORDS>; do
  <LIST>
done

Description

This compound command provides a kind of menu. The user is prompted with a numbered list of the given words, and is asked to input the index number of the word. If a word was selected, the variable <NAME> is set to this word, and the list <LIST> is executed.

If no in <WORDS> is given, then the positional parameters are taken as words (as if in "$@" was written).

Regardless of the functionality, the number the user entered is saved in the variable REPLY.

Examples

Portability considerations

See also

Discussion

Enter your comment
 
syntax/ccmd/user_select.txt · Last modified: 2010/04/15 20:50 by thebonsai
GNU Free Documentation License 1.2
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0