user input from shell scripts

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Mike Starke
日付:  
題目: user input from shell scripts
I am trying to convert a couple perl scripts to simple
shell scripts (nothing but a simple excercise for myself).

The basic format I have always used went something like this:

print "Enter Your Name: ";
$name = <STDIN>;
chomp $name;

Would the following be the proper way for bash?

echo "EnterYour Name: "
read -e NAME
echo $NAME

--
-Mike

:wq!