|
Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://comet.sai.msu.ru/UNIXhelp/scrpt/scrpt2.6.4.1.html
Дата изменения: Fri Jan 17 12:43:20 1997 Дата индексирования: Tue Oct 2 02:05:45 2012 Кодировка: Поисковые слова: rainbow |
To prompt for commands to run:
#!/bin/sh
while echo "Please enter command"
read response
do
case "$response" in
'done') break # no more commands
;;
"") continue # null command
;;
*) eval $response # do the command
;;
esac
done
This prompts the user to enter a command. While they enter a command or null string the script continues to run. To stop the command the user enters done at the prompt.