Global Variable

Hi,

I have created a variable say today at the begin having 123 as its value and inside a for loop it gets resolved to some value say 150 in its first iteration.

How can I use this value 150 ( 1st iteration's ) outside the scope of for loop ?. In the same way I wanted to use all iteration's value outside the loop. Is that possible in shell scripting ?

I'm using KSH shell

It depends on what is in your loop. Variables modified in a subshell environment will not be seen in the parent shell's execution environment.

Show us your code, explain what you're trying to do, and show us what you are getting.

NOTE: If this is a homework assignment, you need to post your question to the Homework and Coursework forum and follow the rules required for homework questions.