get user input in shell script
by Ramya[ Edit ] 2009-12-05 19:24:45
Get user input in shell script:
To get an input value from the user use the command
"read".
echo "Enter file name:"
read name
O/P:
[root@localhost htdocs]# sh test.sh
Enter file name:
prince
Use this name as $name variable in the code like,
echo "Welcome $name"