![]() |
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 |
| Problem while execution of second set of commands | ran16 | Shell Programming and Scripting | 6 | 06-16-2008 01:31 PM |
| problem with shell script execution | anju | Shell Programming and Scripting | 2 | 05-08-2008 01:50 AM |
| use two unix commands to solve the following problem | vicky20000 | UNIX for Advanced & Expert Users | 3 | 01-20-2007 06:35 PM |
| problem with directory commands | tej.buch | Shell Programming and Scripting | 1 | 01-23-2006 02:22 AM |
| Find & tar execution problem | ianf | Shell Programming and Scripting | 3 | 05-24-2002 09:40 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Problem while execution of second set of commands
Hi,
I have a shell script with code . perf.env cd $QRY_DIR for SHELL_FILE in sql1 do export SNAME=$SHELL_FILE ${SCRIPT_DIR}/perf_qry.sh ${SPOOL_DIR} ${DB_ENVNAME} ${NAME} & RC=$(expr ${RC:-0} + $? ) sleep 60 if [ $RC == 0 ] then echo sysdate>test1 echo query1.txt>>test1 grep -i selected sql_test.txt>>test1 grep -i elapsed sql_test.txt>>test1 awk '/rows selected/ { $0=$1 } /Elapsed/ { split($2, t, ":");$0=3600*t[0]+60*t[1 ]+'t[2]+.001*t[3]' }{ out=out sprintf("%s%s",NR==1?"":",","\047"$0"\047") }END{ print("insert into FDW_QUERY_TIME values ("out");") }' test1>test2 fi done exit $RC My problem is after executing the sql1 and the spooling is completed I want to execute the next bit of code after sleep.I actually want to grep the spooled file items.but before spooling is completed the command are executed. Can any one help me to correct this Dont know the reason but my post has been duplicated..So this thread can be closed Last edited by ran16; 06-15-2008 at 10:59 AM.. Reason: duplicated |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|