![]() |
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 |
| 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 |
| file not found error during loop | earls | Shell Programming and Scripting | 3 | 05-09-2009 05:25 PM |
| random array index returning values not contained | VRoemer | High Level Programming | 5 | 01-20-2009 05:39 PM |
| Usermod returning syntax error | syndex | Shell Programming and Scripting | 6 | 07-02-2007 12:38 PM |
| How do I prevent cron from returning errors on a file not found? | goodmis | Shell Programming and Scripting | 6 | 02-06-2007 10:14 AM |
| variable not found with loop? | douknownam | Shell Programming and Scripting | 2 | 09-27-2004 10:59 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Loop on array variable returning error: 0 not found
I'm guessing i have a syntax error. I'm not sure it get's past the the while condition. I get an error 0 not found. Simple loop not sure what I'm doing wrong.
Code:
#!/usr/bin/ksh
set -A MtPtArray /u03 /u06
tUbound=${#MtPtArray[*]}
echo $tUbound
i=0
while ($i -lt $tUbound)
do
print ${MtPtArray[1]}
((i=$i+1))
# i=`expr $i+1`
echo $i
done
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|