![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk doubt.. | esham | Shell Programming and Scripting | 11 | 10-11-2007 02:24 AM |
| Condition test ( [[ ]] ) doubt | thambi | Shell Programming and Scripting | 2 | 08-17-2007 02:52 AM |
| doubt in AWK | abnirmal | Shell Programming and Scripting | 4 | 05-08-2007 05:27 PM |
| doubt on name | shruti_mgp | UNIX for Dummies Questions & Answers | 1 | 03-10-2005 10:21 AM |
| doubt it sed | esham | Shell Programming and Scripting | 2 | 03-08-2005 01:52 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
|
||||
|
That is ksh the (( .. )) construct: it is equivalent to let for arithmetic operations.
$(( .. )) lets you assign the result to a variable. see man ksh for more information. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|