![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 or more if conditions | dr_sabz | UNIX for Dummies Questions & Answers | 3 | 01-15-2009 06:20 AM |
| problem with if, while, for conditions | kittusri9 | Shell Programming and Scripting | 3 | 04-24-2008 09:15 AM |
| Search Mulitiple String pattern in a file | krishnan_6015@y | Shell Programming and Scripting | 2 | 11-23-2007 04:03 AM |
| if statement with two conditions | cin2000 | Shell Programming and Scripting | 1 | 01-23-2006 03:21 PM |
| Mulitiple Nic's | Magnus | IP Networking | 2 | 11-05-2001 10:15 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Mulitiple conditions in While Do loop.
Hi guyz,
I have a WHILE loop which shud DO certain jobs when it satisfies the condition and it does…but I also need to assign a different job if it doesn’t satisfy the condition..how can I do this.Below is my script. if [ `datecalc.ksh -a $sysdate - $vdt1` -ge 7 ]; then echo "if statement" while [ 7 -le `/erp/apps/infa/PowerCenter8.1.1/server/infa_shared/SrcFiles/datecalc.ksh -a $sysdate - $vdt2` ]# (This checks if the difference of dates is less than 7,it is exiting out of the loop if the date diff is > 7..I want to send an email if it is > 7 but where can I have that in a WHILE/DO loop? ) do # vdt3 should be used in FTP Archive and rename # vdt3=$(printf "%04d%02d%02d" $vdt2) echo $vdt3 echo " in while loop" # ---------------------------------------------------- # Set Environment for HEC Schema. # --------------------------------------------------- #Kicking off the STG workflow # pmcmd startworkflow -sv SPRDEV23REP_Integration_Service -d Domain_ebi55rdv -u DEVUSER -p ******* -f CWT_STG -wait wf_tes t echo "Done pmcmd" # Calling the rename files #/erp/apps/infa/PowerCenter8.1.1/server/infa_shared/SrcFiles/cwt_rename_files_npc.sh $vdt3 echo $vdt3 #updating the date from the table abc=`sqlplus -s A23300/******@ODSDEV553 <<eof whenever sqlerror exit sql.sqlcode; set serveroutput on; UPDATE IBP_RES_NPC.LOAD_DATE SET LOAD_DATE = TO_DATE('$vdt3','yyyymmdd'); COMMIT; EXIT; eof` # while loop increment vdt2 vdt2=`/erp/apps/infa/PowerCenter8.1.1/server/infa_shared/SrcFiles/datecalc.ksh -a $vdt2 + 7` echo $vdt2 done fi Thanks, Sud |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|