Hi
What does
while ( : ); do
......
......
......
done;
mean? Does "while ( : )" refer too while true? Thanks.
Hi
What does
while ( : ); do
......
......
......
done;
mean? Does "while ( : )" refer too while true? Thanks.
while :
evaluates to while true
let i=1
while :
do
echo $i
i=$(( $i + 1))
done
Thanks Jim.
Another follow up question to that.....so is there going to be just one iteration in this loop? Just want to clarify the meaning of "while true", does it mean ...run this loop while there is a value to operate on? 0 meaning no value. Thx.
It creates an infinite loop. You have use the break, return, or exit keywords to get out of the loop (break), or end the script/function (exit, return).
Thanks.