How can i use variables as the initial and final values of a variable in for loops
How can i use variables as the initial and final values of a variable in for loops
|
In what language?
|
posix shell for and variables
The first argument to for is defined as part of the for statement, but the word list could use a preset variable, which you could unset after the for loop.
Was that what you were asking, or did I misunderstand? |
How about showing us an example of what you're thinking? At least show us the inputs and the desired output.
The for loop syntax is quite simple: Code:
for variable in word word word; do Code:
var1='a b c' |
All times are GMT -5. The time now is 11:52 AM. |