|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
ksh 88 (( expression1 ? expression2 : expression 3 )) - HelpPlease
Greetings,
Version 11/16/88 S: HP-UX 11.11, AIX 5.3.0.0, SUN S Goal is to Page Primary during Mon to Fri between 9 and 5 PM, if not page on-call. Time check works fine, one liner doesn't work: TIME=$(date +%H) case $TIME in 01|02|03|04|05|06|07|18|19|20|21|22|23| 00)DBA_PAGER="$N_CALL_PAGER" ;; 08|09|10|11|12|13|14|15|16|17)DBA_PAGER=$PRIAMRY_P AGER ;; esac DNUM=$(date +%u) # Day Number (( (DNUM < 6) ? PAGE="N_CALL" : PAGE="PRIMARY" )) ksh: (DNUM < 6) ? PAGE=N_CALL : PAGE=PRIMARY : syntax error Not sure what am I doing wrong For now I am using this: if (( DNUM 6 )) then PAGE="N_CALL"; else PAGE="PRIMARY" fi Regards & Thanks BN |
![]() |
| Viewing: Web Development Archives > FAQs > Unix/Linux > ksh 88 (( expression1 ? expression2 : expression 3 )) - HelpPlease |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|