![]() |
|
|
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 |
| Not access variable outside loop when a reading a file | ricardo.ludwig | Shell Programming and Scripting | 4 | 05-24-2009 12:14 AM |
| Unable to access 3500 FC array. Where is the problem?.. | Sapfeer | SUN Solaris | 7 | 04-01-2009 08:03 AM |
| unable to access a variable not local to a while loop | codeman007 | Shell Programming and Scripting | 6 | 12-25-2008 04:56 PM |
| Unable to access home area | Mr Pink | SUN Solaris | 1 | 04-15-2007 06:57 PM |
| unable to access hpfs/ntfs properly | moxxx68 | UNIX for Dummies Questions & Answers | 1 | 11-08-2005 04:13 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Unable to access variable outside loop
I am unable to access the value set inside the loop from outside loop .
Thought of taking this to forum , I had seen other replies also , where a pipe takes the execution to another shell and mentioned thats the reason we do not get the variable outside loop . But I am getting an issue and I am not using pipe . A sample code below . I do not know where I am going wrong .Any help would be highly appreciated. (note my tree1.txt contains only 1 line , just trying to test if I can access the value for a variable set inside a while loop) ************* count=0 while read line do count=10 echo $count done < tree1.lst echo count:$count ************Result********** 10 count:0 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|