![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Gentoo: POV-Ray User-assisted execution of arbitrary | iBot | Security Advisories (RSS) | 0 | 12-15-2008 11:10 AM |
| Gentoo: Graphviz User-assisted execution of arbitrary | iBot | Security Advisories (RSS) | 0 | 11-10-2008 10:10 AM |
| exit script if user input not four characters | ajp7701 | Shell Programming and Scripting | 2 | 10-30-2008 05:48 PM |
| Set User ID on execution mode. | videsh77 | UNIX for Dummies Questions & Answers | 5 | 03-02-2007 01:51 PM |
| Question on Set User ID on Execution | akrathi | UNIX for Dummies Questions & Answers | 7 | 10-07-2005 05:31 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
User input for execution of script
Hi,
I need to get the user input and execute a particular script based on the input provided. For E.g. When I execute the script say Test.sh it should prompt "For which country I need to execute the script? (US/India)" Based on the input as US or India from the user the execution of the steps in the script need to be done. I have put some sample code can anyone please help me correct it and get the execution done successfully? How can I accept the user input ?? Code: $ECHO $n "Enter the Country for which you want the installation to be executed? (US/India). $C" if [ "${COUNTRY_SPEC}" = "US" -o "${COUNTRY_SPEC}" = "us"] then COUNTRY=US else COUNTRY=India fi echo -e "The installation is for $COUNTRY" |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|