The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-05-2008
ravi raj kumar ravi raj kumar is offline
Registered User
  
 

Join Date: Dec 2006
Location: hyderabad
Posts: 102
IF condition doubt

Hi i found the following code in a date calculation script.

if ((!(year%100))); then
((!(year%400))) && leap=1
else
((!(year%4))) && leap=1
fi
I have not find such an use of if statement till now.
As for my knowledge this is the syntax of if statement

if [ condition_A ]
then
code to run if condition_A true
elif [ condition_B ]
then
code to run if condition_A false and condition_B true
fi

Can any one tell me how the above code works.


cheers
RRK