This is the third thread with your identical problem. Please share bip.sh! In above code snippet, bip.sh DOES NOT RUN in background!
Hi Rudi,
Just shared the BIP in my other post
---------- Post updated at 05:28 PM ---------- Previous update was at 12:21 PM ----------
Quote:
Originally Posted by RudiC
This is the third thread with your identical problem. Please share bip.sh! In above code snippet, bip.sh DOES NOT RUN in background!
Hi here is the content of bip
Code:
#!/bin/sh
ARBOR_DB_PASSWD=`cat $ARBORDIR/.arborpw`; export ARBOR_DB_PASSWD
DB_PASS=$ARBOR_DB_PASSWD; export DB_PASS;
ORACLE_SID=$ARBOR_CATALOG_DATABASE; export ORACLE_SID;
ARBORCTRLRPT03=$ARBORDATA/reports/ctrl; export ARBORCTRLRPT03;
Usage(){
echo "\n\n Usage is: `basename $0` <proc_num> <bip mode> <account_no>\n"
echo " where <proc_num> is a number between 01 and 99"
echo " <bip_mode> is a number. Use 0=production, 3=proforma, 6=backout"
echo " <bip_mode> is an arbor accout number\n\n"
exit 0
}
# Check number of arguments
if [ "$#" -ne 3 ] ; then
Usage
fi
# Check to see if ARBORDBU is set
if [ -z "${ARBORDBU}" ] ; then
echo "ERROR: \$ARBORDBU environment variable is not set\n"
echo "This script requires that the \$ARBORDBU environment variable be set.\n\n"
exit 1
fi
# Check to see if DB_PASS is set
if [ -z "${DB_PASS}" ] ; then
echo "ERROR: \$DB_PASS environment variable is not set\n"
echo "This script requires that the \$DB_PASS environment variable be set.\n\n"
exit 1
fi
# Check to see if ORACLE_SID is set
if [ -z "${ORACLE_SID}" ] ; then
echo "ERROR: \$ORACLE_SID environment variable is not set\n"
echo "This script requires that the \$ORACLE_SID environment variable be set.\n\n"
exit 1
fi
# Set the variables for arguments passed by the user
PROCNAME=bip$1
BIP_MODE=$2
ACCOUNT=$3
# Get the database from the user's environment
DB=$ORACLE_SID
# Set this so that the process doesn't try to connect to Operations Center
OAM_ENV_CONN_MA=FALSE
export OAM_ENV_CONN_MA
# Log into sqlplus, delete any existing entries, and make the new entry
sqlplus -s $ARBORDBU/$DB_PASS@$DB <<END
update SYSTEM_PARAMETERS set int_value=1 where module='BIP' and parameter_name='TRA_SWITCH';
delete from PROCESS_SCHED where process_name = '$PROCNAME';
delete from PROCESS_STATUS where process_name = '$PROCNAME';
insert into PROCESS_SCHED values('$PROCNAME','$PROCNAME','N',$BIP_MODE,SYSDATE,86400,0,2,55,'$DB','CMF.account_no in ($ACCOUNT)',1,NULL,0,NULL,0);
commit;
exit
END
echo "Starting BIP in the background with process name = \"$PROCNAME\""
BIP $PROCNAME 3 &
Moderator's Comments:
Please use CODE tags for multi-line code, input, and output samples instead of ICODE tags.
Last edited by Don Cragun; 06-20-2013 at 12:31 AM..
Reason: Changed ICODE tags to CODE tags.
I'm using PERL on windows NT to try to run an extract of data. I have multiple zip files in multiple locations. I am extracting "*.t" from zip files and subsequently adding that file to one zip file so when the script is complete I should have one zip file with a whole bunch of ".t" files in it.
... (2 Replies)
I am attempting within a for-loop, to have my shell script (Solaris v8 ksh) wait until a copy file command to complete before continueing. The specific code is:
for files in $(<inputfile.lst)
do
mv directory/$files directory/$files
ksh -m -i bg %%
wait $!
done
I am shaky on the... (3 Replies)
As far as I can tell, the bash wait command waits for a logical "AND" of all the child processes.
Assuming I am coding in C:
(1) What is the function I would use to create multiple bash child process running perl?
(2) What is the function I would use to reinvent the bash wait command so I... (4 Replies)
Hi All,
Am finding performance of my SD card using hdparm.
hdparm -tT /dev/BlockDev0
/dev/BlockDev0:
Timing cached reads: 1118 MB in 2.00 seconds = 558.61 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate
ioctl for device
Timing buffered disk reads: 14... (0 Replies)
When running a command using the >(cmd) syntax in bash how do you wait for the command to complete before moving on in your script?
Here is a simple example:
zcat largefile.gz | tee >(wc && echo “HELLO”) > /dev/null
# I tried wait, here but it doesn't wait for the process in the subshell.... (8 Replies)
Hi,
I am facing a strange issue,
when i call a script from my while loop in background it doesnt go in background, despite the wait i put below the whil loop it goes forward even before the process put in background is completed.
cat abc.txt | while read -u4 line
do
#if line contains #... (2 Replies)
Hi All,
I have a question related to Shell scripting. In my shell script, I have following two commands in sequence:
sed 's/^/grep "^120" /g' $ORIGCHARGEDAMTLIST|sed "s;$;| cut -f$FIELD_NO1 -d '|' | awk '{ sum+=\$1} END {printf (\"%0.2f\\\n\", sum/100)}' >$TEMPFILE
mv $TEMPFILE $ORIGFILE... (3 Replies)
Hi All,
I have the requirement that ,i have to write a shell script that job has to wait for a 7 touch files created by another application for 4 hours, if i get all 7 touch files ,i have to send a mail that i jobs are completed, if if it is waiting for more than 4 hours i have to send a mail... (2 Replies)
Hello,
im having bash script with
while ***
command1 &&
command2 &&
command3 &&
done
i want to ask how i can prevent overloading server, by waiting untill all commands complete? any low resources intensive command like "wait" - i dont know if exist? (2 Replies)