Quote:
Originally Posted by
244an
You have a loop that executes 3 times, a has the values 1, 2 and 3.
So, lap 1 it will do what's in the first condition; send mail with /usr/bin/mei.txt
lap 2 it will do what's in the second condition; send mail with /usr/bin/mei2.txt
lap 3 it will do nothing.
The last condition, after the while-loop will never be met.
And it's a good idea to use indenting, see some of the answers you got earlier.
but , they no repeat the loop while de condition its true ?
in this case a <= limite , so
if a = 1 do the first condition.
not do the second condition.
a++
out of while ,
the condition if final , its a = 2 ? no. so they not do nothing.
im wrong ?
the original idea its that if the script run one time , send the first condition , if they have a second run , they do the second condition if the script execute again the value "$a" return to 0