|
Re: lug-bg: yes/no Скрипт
- Subject: Re: lug-bg: yes/no Скрипт
- From: Georgi Genov <ggenov@xxxxxxxxxxx>
- Date: Thu, 07 Oct 2004 16:13:22 +0300
за да не дразня програмистите ще се корегирам :)
#!/bin/sh
read_answer() {
echo -n "Please enter [y,Y] or [n,N] "
read answer
}
result() {
echo $1
if [ ! $1 = "Other" ]; then
exit 0
fi
}
read_answer
while [ ! $answer = [yY] ] & [ ! $answer = [nN] ]; do
case "$answer" in
[Yy]*)
result Yes
break
;;
[Nn]*)
result No
break
;;
*)
result Other
read_answer
;;
esac
done
result Default
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|
|
|