Shell Scripting Tutorial for Beginners 21 - Select loop

preview_player
Показать описание
SELECT COMMAND Constructs simple menu from word list. It Allows user to enter a number instead of a word. So User enters sequence number corresponding to the word.
--------------------------------------------
Syntax:
select WORD in LIST
do
RESPECTIVE-COMMANDS
done
--------------------------------------------
Loops until end of input, i.e. ^d (or ^c)

★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

In case statement...can we write echo$name selected;;
Y did you just write echo mark selected?

shagufthanaaz
Автор

great tutorial but my test of the selected number other than 1..4 (ie, 5 for example, did not cause the error message to print) could you explain why the error message is not printing please, thanks!

KE
Автор

So in what case it exit from this select loop? Like in c we can use "break".

shivamsinghal
Автор

@4:48 I don't think you need a case stmt for that... Sry, couldn't help myself : ) Great explanation!

nathantoulbert
Автор

What is the specific reason to use case statement in select loop... in this video both scripts giving same output.. then why should we use case statement

shilpavenkat
Автор

Please upload a video for "functions"

akmfaisal
Автор

Bro kali linux ma ya select loop work nhi kr raha

ziddiboy
Автор

Looking for general scenario in system administration using select loop?

rishitsheth