I've written a small script but I don't get what i'd like, I think that the problem comes from a ";" but I don't understant where I made a mistake. Here's the script :
#!/bin/sh
j=0
i=0
for i in fdsfdsf;
do
if gfdgfdgx;
then
cbvcbg;
fi;
done
i=0
if j=6;
then
for i in hjdgjyh;
do
juyirurtjyt;
done
echo "jhgdjhg" >/yeudhg
date >>/yeudhg;
else
if [ gfgqdfg ];
then
gfdsgfd;
fi;
fi
the "if" in green is not true (the "for" in green is not executed) so the "else" should be executed, but the text in red is executed...
where is the problem?
could someone help me???? (I hope this is the right forum)
#!/bin/sh
j=0
i=0
for i in fdsfdsf;
do
if gfdgfdgx;
then
cbvcbg;
fi;
done
i=0
if j=6;
then
for i in hjdgjyh;
do
juyirurtjyt;
done
echo "jhgdjhg" >/yeudhg
date >>/yeudhg;
else
if [ gfgqdfg ];
then
gfdsgfd;
fi;
fi
the "if" in green is not true (the "for" in green is not executed) so the "else" should be executed, but the text in red is executed...
where is the problem?
could someone help me???? (I hope this is the right forum)