![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Accessing Shell Variables in awk or sed | nasersh | Shell Programming and Scripting | 3 | 05-05-2008 07:44 AM |
| shell variables and sed substitution | duderonomy | UNIX for Advanced & Expert Users | 2 | 05-05-2008 02:54 AM |
| Using shell variables In awk | nortypig | Shell Programming and Scripting | 11 | 08-24-2006 12:48 AM |
| Shell Script Variables | ragha81 | Shell Programming and Scripting | 3 | 08-22-2006 03:43 AM |
| bash shell variables | xNYx | UNIX for Dummies Questions & Answers | 3 | 04-15-2002 04:36 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
variables in shell
hi, i'm new in shell scripting and i'm working on bash on solaris 5.9
after try many stuff with unexpected results, i wonder: it is not posible in bash, to use a variable that was created inside a loop, out of it? i mean, for instance: cat mytext | \ while read text do viko[$i]=$text i=$i+1 done echo ${viko[1]} echo $i those variables, seem to be empty isn't posible to use any of those (array elements, and $i) outside the loop, before the done statement? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|