01-29-2009
To accept user input use the read command immediately after your echo.
echo "Enter the Country for which you want the installation to be executed? (US/India). \c"
read COUNTRY_SPEC
if [ "${COUNTRY_SPEC}" = "US" -o "${COUNTRY_SPEC}" = "us" ]
then
COUNTRY=US
else
COUNTRY=India
fi
echo -e "The installation is for $COUNTRY"
Last edited by ronnie_uk; 01-30-2009 at 05:34 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script which takes user input as options provided
PS3="Select option to do deploy : "
select OPTION in "eardeploy" "hotdeploy"
do
case $OPTION in
"eardeploy" )
eardeploy.sh
break;;
"hotdeploy" )
... (1 Reply)
Discussion started by: codeman007
1 Replies
2. Shell Programming and Scripting
I am using festival speech synthesis system and I would like to allow user input in a browser. This will be taken by a php page which is then supposed to pass the input text to a perl script. The perl script should pass this text to the festival engine by executing a unix command. this in turn... (2 Replies)
Discussion started by: wairimus
2 Replies
3. Shell Programming and Scripting
Hi,
I have a perl script which prints me the epoch value of a specific date and time given.Now I want to proceed to a next step ie i want to give the input at the time of execution.
I have to initialise the date and time values in the script before executing it.But now i want to give the date... (3 Replies)
Discussion started by: jyothi_wipro
3 Replies
4. Shell Programming and Scripting
I want a shell script to call an expect script but I want the expect script to run in the background so the user is not bothered with what is going on. Is there any way to do this?
---------- Post updated at 08:23 PM ---------- Previous update was at 07:39 PM ----------
got it it was
... (1 Reply)
Discussion started by: los21282
1 Replies
5. Shell Programming and Scripting
Hello
I am trying to create a user input shell scipt. The objective is user should enter the circuit number and the input is saved in a log file. If the user does not enter anything then the question should prompt it until the circuit no. is entered.
Can any one please correct the code below.... (3 Replies)
Discussion started by: sureshcisco
3 Replies
6. Shell Programming and Scripting
Hi Jim,
I have following script,i which i need to take dynamic value .
script,
nawk -v v1=grep"INT_EUR" $propertifilename | cut -d"=" -F2` -F'~' '{if (NF-1 !=v1)
{print "Error in " $0 " at line number "NR" tilde count " N-1}}' $filename
In the above script i want to use INT_EUR as a variable... (2 Replies)
Discussion started by: Ganesh Khandare
2 Replies
7. Programming
Hi gurus,
I have a requirement where I need to remotely run a perl script as another user.
Running the script locally as the required user is fine, however I need to su with the script due to filesystem permission issues. I do not want to update permissions on the remote server due to security... (5 Replies)
Discussion started by: melias
5 Replies
8. Shell Programming and Scripting
i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled.
#!/bin/sh
echo " Enter your choice to continue y/Y OR n/N to quit "
read A
if
then
echo " user requested to continue "
##some commands... (7 Replies)
Discussion started by: only4satish
7 Replies
9. Shell Programming and Scripting
#/bin/sh
echo "enter the user name"
read $username
echo "Enter new home directory"
read $newhd
usermod -d $newhd $username ;;
error while executing :
enter the user name
Rev
Enter new home directory:
/home/58745
usermod: option requires an argument -- 'd'
Try `usermod --help' or... (2 Replies)
Discussion started by: Revanth547
2 Replies
10. Shell Programming and Scripting
Hi everyone, I'm new here and just a beginner in linux scripting.
Just want to ask for help on this one.
I am trying to create a script that will accept user input (year-month and user/s).
I wanted to have the script to continue running, until the user inputs a DATE and name/s of user/s. ... (2 Replies)
Discussion started by: Helskadi
2 Replies