select Command Examples

Bash builtin construct for creating menus. More information: https://www.gnu.org/software/bash/manual/bash.html#index-select.

select {{word}} in {{apple orange pear banana}}; do echo ${{word}}; done

select {{line}} in $({{command}}); do echo ${{line}}; done

PS3="{{Select a file: }}"; select {{file}} in *; do echo ${{file}}; done

{{fruits}}=({{apple orange pear banana}}); select {{word}} in ${{{fruits[@]}}}; do echo ${{word}}; done