da_rinkes wrote:
using the following example ,i try to explain why i use “i<4”
without i<4 ,we will see this and it is not correct.
What is this for?thanks for replyError output (STDERR) is included in the shell stream.i < 4
So your code looks OK, beside the i < 4 test.
using the following example ,i try to explain why i use “i<4”
for((i=0;i<10;i++));
do
echo hello;
echo $0;
done
my input is "./hello.sh"without i<4 ,we will see this and it is not correct.
hello
hello
hello
hello
hello
hello
hello
hello
hello
and i can not get stderr when i remove "i<4"