Get the App
SLTechnology News&Howtos  ›  Servers  › 

Select format

Shulou Source: shulou.com Published: 2022-06-03 09:20:35 12月06日 Update

Format:

Select variable name in list

Do

Break

Done

Program:

#! / bin/bash

Echo "What would you want:"

Select var in "I"LOVE"YOU"

Do

Break

Done

Printf "choose:%s\ n" $var

Running result:

Normal selection:

Out-of-range selection:

Conclusion: there is no default processing for select statements. If the selection is out of range, put back the empty character.

Tags: Selection format variable program empty character result conclusion statement processing run Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Docker Linux NVidia OPPO Reno