Basic usage of select
Select creates a menu for you and its very simple to use.Here is an example
#cat select.sh
select test
do
echo $test
done
#./select.sh item1 item2 item3
1) item1
2) item2
3) item3
#? 2
item2
1) item1
2) item2
3) item3
Also this creates an infinite loop...so you need a break :)
#cat select.sh
select test
do
echo $test
done
#./select.sh item1 item2 item3
1) item1
2) item2
3) item3
#? 2
item2
1) item1
2) item2
3) item3
Also this creates an infinite loop...so you need a break :)
0 Comments:
Post a Comment
<< Home