Originally posted by: SystemAdmin
ooops when I posted the message is not showing my braces.
<pre class="jive-pre"><code class="jive-code jive-java">
if ; then
do the work
else exit
fi
</code></pre>
or
<pre class="jive-pre"><code class="jive-code jive-java">
if contion ; then
do the work
else exit
fi
</code></pre>
do I need two braces or one? and also when ; is needed and when it is not needed.
I ALWAYS use 2 braces.
The semi colon IS required if you are putting 2 keywords on the same line
if x=1;then echo "hello"; else exit;fi
Is the same as:
if x=1
then echo hello
else exit
fi
#AIX-Forum