Hello for all !
,... Well,... I guess

just think

,...
"if" <- is a command
"[" <- is alias for "test"
"test" <- is a command
"${rtn}" = "0" and "${rtn2}" <- is parameter for command test
test or [ <- is parameter for command if,...
'if' statement is like eval,.. because run all parameter with
'execv()' an C/C++ function then check this
The default system return is '0' or not zero for executions,.. '0' for
'if' statement is like true or '1',...
well now if I to do : '#if [ $a = $b and $b = $c ] && [ $c = $d ]'
"$a = $b and $b = $c" <- is parameter for test command ,.. then
command test parse the 'and' statement,.... and return '0' or '!0' for
shell ,.. ( you can get it from $? ) ,.. the system later will do:
$? && [$c = $d] ,.. look this,.. "&&" will be checked from system and
not by command ,...
here is the difference ,.. [] && [] ,.. the system will run the
test,..
and [ $a and $b ] the command will run the test
--
___________________
Anderson J. de Souza
- Networking and Security -
[ - Professional Consulting - The best firewall - ]
http://anjoel.s.googlepages.com -
anjoel.s@gmail.com
Phone: +55 (54) 9115.13.15 - Sip: 1-747-006-0374