Menu: Difference between revisions
Content added Content deleted
(Add the bash UNIX Shell.) |
m (→{{header|UNIX Shell}}: fix a copypaste error (i suppose)) |
||
Line 279: | Line 279: | ||
The bash shell with its [[http://www.softpanorama.org/Scripting/Shellorama/Control_structures/select_statements.shtml select]] statement. |
The bash shell with its [[http://www.softpanorama.org/Scripting/Shellorama/Control_structures/select_statements.shtml select]] statement. |
||
<lang bash>bash$ PS3='Which is from the three pigs: ' |
<lang bash>bash$ PS3='Which is from the three pigs: ' |
||
bash$ select phrase in 'fee fie' 'huff and puff' 'mirror mirror' 'tick tock'; do |
bash$ select phrase in 'fee fie' 'huff and puff' 'mirror mirror' 'tick tock'; do |
||
> if [[ -n $phrase ]]; then |
|||
> PHRASE=$phrase |
> PHRASE=$phrase |
||
> echo PHRASE is $PHRASE |
> echo PHRASE is $PHRASE |