Bug 16588 - bug with ksh
bug with ksh
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: zsh (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-08-19 13:47 EDT by Need Real Name
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-08-19 13:47:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2000-08-19 13:47:22 EDT
Hi,
i've scripts writen with ksh, to administrate Oracle Databases
my problem is:
i initialize a variable before a loop (while do...done)
next, in the loop , my variable increase (let a=a+1,...)
and when i leave the loop, my variable have the value before the loop
and not the value at the end of the loop !

Could you help me ?

I've a similar problem whith zsh and the values store in arrays
Thanks 

gbouchez@nordnet.fr
Comment 1 Trond Eivind Glomsrxd 2000-08-19 14:11:47 EDT
I can't reproduce this (zsh and ksh), they both seem to work like expected:

a=1
print $a
while true  ; do
    print $a;
    let a=a+1
    if [ $a -ge 21 ]; then
	break;
    fi
     
done

print "Done!"
print $a


Note You need to log in before you can comment on or make changes to this bug.