![]() |
|
|
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 |
| Need help in storing command line argument argv[2] to a variable of int type | frozensmilz | High Level Programming | 3 | 12-12-2008 11:11 AM |
| storing a command in a variable | nookie | Shell Programming and Scripting | 2 | 10-11-2008 11:55 AM |
| Ksh Storing Multiple Files and reading each line in each file. | developncode | UNIX for Dummies Questions & Answers | 1 | 04-08-2008 05:44 PM |
| Storing space delimited line in var with loop? | eltinator | Shell Programming and Scripting | 2 | 08-24-2007 02:09 AM |
| Storing values in variable | matrixmadhan | Shell Programming and Scripting | 1 | 04-01-2005 02:56 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Storing Command Line Values
Hi,
I am trying to read the value passed by the user and store it in a variable so that later I can read it from the variable. But I am getting errors. Can you please help? Thanks. Code: $ECHO "Enter the Country for which you want the installation to be executed? (US/India):" read COUNTRY if [ "$COUNTRY" = "us" -o "$COUNTRY" = "US" ] then $COUNTRY="US" else $COUNTRY="India" fi $echo "The installation is for: $COUNTRY" Execution Result: ./Country_Test.sh: line 4: Enter the Country for which you want the installation to be executed?: command not found us ./Country_Test.sh: line 8: us=US: command not found ./Country_Test.sh: line 13: The installation is for: us: command not found |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|