shell编程笔记五:select

#!/bin/bash
echo "What is your favourite OS?"
select var in "Linux" "Gnu Hurd" "Free BSD" "Windows" "Other"; do
break;
done
echo "You have selected $var"

 

ps :

var=`date "+%Y%m%d %H%M%S"`
posted @ 2013-05-03 16:28  践道者  阅读(190)  评论(0编辑  收藏  举报