![]() |
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 |
| Remove an element from an array in PERL | chriss_58 | Shell Programming and Scripting | 3 | 06-06-2008 05:08 AM |
| Structure element accessing issue... | Praveen_218 | High Level Programming | 4 | 04-18-2008 11:25 AM |
| A final question! Compare character with each array element | rorey_breaker | Shell Programming and Scripting | 1 | 09-28-2007 09:26 AM |
| array type has incomplete element type | jaganadh | High Level Programming | 1 | 07-24-2007 03:54 AM |
| Perl delete an element from array | ahtat99 | Shell Programming and Scripting | 6 | 01-18-2007 09:25 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hello everyonel,
I have an array set like so num=4 read name arr[$num]=name I go through while loop to assign different values to different array element from 1 to 4. when I try to access the FIRST element of the array I get the last one first. Like if I say ${arr[1]} it will show the last element of the array that I populated last. I do not know how to reset the pointer so when I say ${arr[1]} it will show me the very first element. Appreciate your help. |
|
||||
|
Perderabo
I just changed my code and am starting from element Zero but when I go back to access them it will list last one first like so: if I have 4 elements from 0 through 3 when I try to access them it will list as 3 1 2 0 even when I say ${arr[0]} |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|