![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Local shell script need to be executed on a remote linux box | rajeshomallur | Linux | 6 | 05-02-2008 02:05 PM |
| How to make variables in script function local? | alex_5161 | Shell Programming and Scripting | 5 | 03-07-2008 02:03 PM |
| Reading Multiple Variables From a Single Line in Shell | Drek | Shell Programming and Scripting | 14 | 12-21-2006 11:20 AM |
| Reading a CSV file into shell variables problem | multidogzoomom | Shell Programming and Scripting | 6 | 10-11-2005 05:43 PM |
| Shell script to create local homes | Steve Adcock | Shell Programming and Scripting | 11 | 10-25-2004 05:18 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hello,
I have a problem with trying to run a shell script that reads in user input, validates, and sets to a 'default' value if the input is not valid. I cannot get the portion of resetting to a default value to work. These lines are skipped, and the value of x is still whatever the user entered initially. Is it possible that the first x variable is not the same as the x in 'setx=10' line? simpled version of the script #!/bin/sh # echo "Enter x" read x echo "You entered $x" # # lines to validate here... # .... # # I cannot get the following lines to work set x=10 echo "x reset to $x" |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|