I can't remember the title of the clasic KSH book we used in the good old days (it was white with blue lettering if I remember right), but I do not remember it ever saying that ENVs would be local within a 'while' loop. Until Linux, I never had this problem with ksh.
I don't know if that was the case though with bsh (original bourne shell) as we never used it.
--- Jeff Vian jvian10@charter.net wrote:
On Mon, 2005-09-26 at 14:42 -0700, BRUCE STANLEY wrote:
Then this is a departure from original/standard System V behaviour. Again, all System V based Unixes I have programmed under did have this behaviour.
Anyone converting scritps (as I had to do) will run into this problem/behaviour.
BTW, On AIX when I tried using bash I had the same effect as I did on Linux. When I tried it with ksh the results were as you obviously expected. The subshell for the cat command was able to modify the values of the variable in the parent.
--- Tim Waugh twaugh@redhat.com wrote:
On Mon, Sep 26, 2005 at 06:15:21AM -0700, BRUCE STANLEY wrote:
This seems to be a Linux issue with the shells.
It is correct behaviour, and POSIX-compliant to boot.
Please see the bash FAQ, question E4.
/usr/share/doc/bash-3.0/FAQ
Tim. */
--
fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list