RE: RE: wait/notify syntax for unix help please

2003-10-28 Thread Dunscombe, Chris
There's no problem with waiting after the process has already finished,
you'll just get a non-zero return code the wait but evrything will still
work fine.

Chris

-Original Message-
Sent: 27 October 2003 18:54
To: Multiple recipients of list ORACLE-L


if you attemp to wait after the process is complete, will it cause a
problem? say the PID no longer exists when you issue wait? 
 
 From: Dunscombe, Chris [EMAIL PROTECTED]
 Date: 2003/10/27 Mon AM 11:39:34 EST
 To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
 Subject: RE: wait/notify syntax for unix help please
 
 I don't know about Solaris but on HP-UX and AIX you can do:
 
 run_sql_1 
 run_sql_2 
 wait
 
 This will wait until both have finished.
 
 Re a specific PID $! will return you PID of the last child process and
then
 you can wait on that PID. Looks something like:
 
 run_sql_1 
 run_sql_2 
 PID_WAIT=$!
 wait ${PID_WAIT}
 
 HTH
 
 Chris Dunscombe
 
 
 -Original Message-
 Sent: 27 October 2003 16:09
 To: Multiple recipients of list ORACLE-L
 
 
 I need to parallelize some sql operations and Im running them from unix
 scripts. 
 
 I want to spawn off a few in the background from a master script, then
have
 the master script 'wait' for them to finish. Ive done this in Java and
with
 dbms_alert, but I cant dig up the syntax to do this with korn shell on
 solaris. 
 
 Also, if I want to wait for a specific PID, how do I get the PID of the
 thread I want to wait for?
 
 so I have
 
 nohup run_sql 
 
 wait(on previous nohup)
 
 then to use notify, I just use 'notify()' inside the script right? 
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: [EMAIL PROTECTED]
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: Dunscombe, Chris
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: [EMAIL PROTECTED]
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Dunscombe, Chris
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


wait/notify syntax for unix help please

2003-10-27 Thread ryan_oracle
I need to parallelize some sql operations and Im running them from unix scripts. 

I want to spawn off a few in the background from a master script, then have the master 
script 'wait' for them to finish. Ive done this in Java and with dbms_alert, but I 
cant dig up the syntax to do this with korn shell on solaris. 

Also, if I want to wait for a specific PID, how do I get the PID of the thread I want 
to wait for?

so I have

nohup run_sql 

wait(on previous nohup)

then to use notify, I just use 'notify()' inside the script right? 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: [EMAIL PROTECTED]
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: wait/notify syntax for unix help please

2003-10-27 Thread Mladen Gogala
I know that bash has wait built in. It works like this:
GODOT=`ps -fu $LOGNAME|grep sqlplus|grep -v PID|perl -e 'while ()
[EMAIL PROTECTED] /\s+/; print $A[1] }'`
wait $GODOT


On 10/27/2003 11:09:25 AM, [EMAIL PROTECTED] wrote:
 I need to parallelize some sql operations and Im running them from
 unix scripts.
 
 I want to spawn off a few in the background from a master script, 
 then
 have the master script 'wait' for them to finish. Ive done this in
 Java and with dbms_alert, but I cant dig up the syntax to do this 
 with
 korn shell on solaris.
 
 Also, if I want to wait for a specific PID, how do I get the PID of
 the thread I want to wait for?
 
 so I have
 
 nohup run_sql 
 
 wait(on previous nohup)
 
 then to use notify, I just use 'notify()' inside the script right?
 
 --
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 --
 Author: [EMAIL PROTECTED]
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 

Mladen Gogala
Oracle DBA



Note:
This message is for the named person's use only.  It may contain confidential, 
proprietary or legally privileged information.  No confidentiality or privilege is 
waived or lost by any mistransmission.  If you receive this message in error, please 
immediately delete it and all copies of it from your system, destroy any hard copies 
of it and notify the sender.  You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. Wang Trading LLC and any of its subsidiaries each reserve the right to 
monitor all e-mail communications through its networks.
Any views expressed in this message are those of the individual sender, except where 
the message states otherwise and the sender is authorized to state them to be the 
views of any such entity.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: wait/notify syntax for unix help please

2003-10-27 Thread Dunscombe, Chris
I don't know about Solaris but on HP-UX and AIX you can do:

run_sql_1 
run_sql_2 
wait

This will wait until both have finished.

Re a specific PID $! will return you PID of the last child process and then
you can wait on that PID. Looks something like:

run_sql_1 
run_sql_2 
PID_WAIT=$!
wait ${PID_WAIT}

HTH

Chris Dunscombe


-Original Message-
Sent: 27 October 2003 16:09
To: Multiple recipients of list ORACLE-L


I need to parallelize some sql operations and Im running them from unix
scripts. 

I want to spawn off a few in the background from a master script, then have
the master script 'wait' for them to finish. Ive done this in Java and with
dbms_alert, but I cant dig up the syntax to do this with korn shell on
solaris. 

Also, if I want to wait for a specific PID, how do I get the PID of the
thread I want to wait for?

so I have

nohup run_sql 

wait(on previous nohup)

then to use notify, I just use 'notify()' inside the script right? 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: [EMAIL PROTECTED]
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Dunscombe, Chris
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: wait/notify syntax for unix help please

2003-10-27 Thread Stephen.Lee

Here's another idea.  Expand on it and modify as needed.

   COUNT=1
   while [ $COUNT -le 8 ]; do
  ## The first jobs command is to clear out any jobs completed
messages.
  jobs  /dev/null
  if [ -z `jobs` ]; then break; fi
  sleep 30
  COUNT=$(( $COUNT + 1 ))
   done
   jobs  /dev/null
   echo SLEPT $COUNT times  $LOG_FILE

   ## Kill any remaining jobs.
   for JOB_NUMBER in `jobs | sed 's/\([^0-9]*\)\([1-9][0-9]*\)\(.*\)/\2/'`;
do
  kill %${JOB_NUMBER}
  echo killed job number $JOB_NUMBER  $LOG_FILE
   done

 
 I need to parallelize some sql operations and Im running them 
 from unix
 scripts. 
 
 I want to spawn off a few in the background from a master 
 script, then have
 the master script 'wait' for them to finish. Ive done this in 
 Java and with
 dbms_alert, but I cant dig up the syntax to do this with korn shell on
 solaris. 
 
 Also, if I want to wait for a specific PID, how do I get the 
 PID of the
 thread I want to wait for?
 
 so I have
 
 nohup run_sql 
 
 wait(on previous nohup)
 
 then to use notify, I just use 'notify()' inside the script right? 
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: [EMAIL PROTECTED]
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: RE: wait/notify syntax for unix help please

2003-10-27 Thread ryan_oracle
if you attemp to wait after the process is complete, will it cause a problem? say the 
PID no longer exists when you issue wait? 
 
 From: Dunscombe, Chris [EMAIL PROTECTED]
 Date: 2003/10/27 Mon AM 11:39:34 EST
 To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
 Subject: RE: wait/notify syntax for unix help please
 
 I don't know about Solaris but on HP-UX and AIX you can do:
 
 run_sql_1 
 run_sql_2 
 wait
 
 This will wait until both have finished.
 
 Re a specific PID $! will return you PID of the last child process and then
 you can wait on that PID. Looks something like:
 
 run_sql_1 
 run_sql_2 
 PID_WAIT=$!
 wait ${PID_WAIT}
 
 HTH
 
 Chris Dunscombe
 
 
 -Original Message-
 Sent: 27 October 2003 16:09
 To: Multiple recipients of list ORACLE-L
 
 
 I need to parallelize some sql operations and Im running them from unix
 scripts. 
 
 I want to spawn off a few in the background from a master script, then have
 the master script 'wait' for them to finish. Ive done this in Java and with
 dbms_alert, but I cant dig up the syntax to do this with korn shell on
 solaris. 
 
 Also, if I want to wait for a specific PID, how do I get the PID of the
 thread I want to wait for?
 
 so I have
 
 nohup run_sql 
 
 wait(on previous nohup)
 
 then to use notify, I just use 'notify()' inside the script right? 
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: [EMAIL PROTECTED]
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: Dunscombe, Chris
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: [EMAIL PROTECTED]
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: RE: wait/notify syntax for unix help please

2003-10-27 Thread Mladen Gogala
On 10/27/2003 01:54:25 PM, [EMAIL PROTECTED] wrote:
if you attemp to wait after the process is complete, will it cause a
problem? say the PID no longer exists when you issue wait?
Why don't you try it? There is this phenomenal Unix IDE called vi
which can help you to write a shell script and O'Reilly has a book
explaini9ng how to use it. There is also a heresy against The One True  
Editor called Emacs, but I'd advise against it.

Mladen Gogala
Oracle DBA


Note:
This message is for the named person's use only.  It may contain confidential, 
proprietary or legally privileged information.  No confidentiality or privilege is 
waived or lost by any mistransmission.  If you receive this message in error, please 
immediately delete it and all copies of it from your system, destroy any hard copies 
of it and notify the sender.  You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. Wang Trading LLC and any of its subsidiaries each reserve the right to 
monitor all e-mail communications through its networks.
Any views expressed in this message are those of the individual sender, except where 
the message states otherwise and the sender is authorized to state them to be the 
views of any such entity.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Mladen Gogala
 INET: [EMAIL PROTECTED]
Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: RE: wait/notify syntax for Unix help please

2003-10-27 Thread Thater, William
Mladen Gogala  scribbled on the wall in glitter crayon:

 On 10/27/2003 01:54:25 PM, [EMAIL PROTECTED] wrote:
 if you attemp to wait after the process is complete, will it cause a
 problem? say the PID no longer exists when you issue wait?
 
 Why don't you try it? There is this phenomenal Unix IDE called vi
 which can help you to write a shell script and O'Reilly has a book
 explaini9ng how to use it. There is also a heresy against The One True
 Editor called Emacs, but I'd advise against it.

Emacs is a nice operating system, but i prefer Unix.;-)

--
Bill Shrek Thater ORACLE DBA  
I'm going to work my ticket if I can... -- Gilwell song
[EMAIL PROTECTED]

I cannot imagine a God who rewards and punishes the objects of his creation,
whose purposes are modelled after our own  - a God, in short, who is but a
reflection of human frailty. Neither can I believe that the individual
survives the death of  his body, although feeble souls harbour such thoughts
through fear or ridiculous egotisms. - Albert Einstein
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Thater, William
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: Unix Help

2003-10-08 Thread Nelson, Allan
Title: Message



DEST_DIR=your_desination_directory
SOURCE_DIR=your_source_directory

for 
file in `ls $SOURCE_DIR`
do
 fn=basename $file
 if [ ! -f $DEST_DIR/$fn ]
 then
 cp $file $DEST_DIR/$fn
 fi
done

Hope 
it helps.
Allan

  
  -Original Message-From: Sujatha Madan 
  [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 07, 2003 
  10:24 PMTo: Multiple recipients of list ORACLE-LSubject: 
  Unix Help
  Hi,
  
  Sorry for the 
  slightly non-Oracle post.
  
  I am after a 
  UNIX code snippet that will help me copy archive logs to another directory BUT 
  not if they already exist. So if only 2 archive logs are generated between 
  script runs only the two new ones should copy. I know I can do this using 
  sysdate - "time interval" but I am trying to avoid 
  that.
  
  Thanks in 
  advance,
  
  Sujatha 
  Madan.

__
This email is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information.  Copying, forwarding or distributing this message by persons or entities other than the addressee is prohibited. If you have received this email in error, please contact the sender immediately and delete the material from any computer.  This email may have been monitored for policy compliance.  [021216]


RE: IGNORE: Unix Help

2003-10-08 Thread Farnsworth, Dave
Title: Message



Or was 
it that we just ignored your post? ;o)

Dave

  -Original Message-From: Sujatha Madan 
  [mailto:[EMAIL PROTECTED]Sent: Tuesday, October 07, 2003 
  11:29 PMTo: Multiple recipients of list ORACLE-LSubject: 
  IGNORE: Unix Help
  Sorry ... but I solved it.
  
  Cheers
  Sujatha
  

-Original Message-From: 
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
Sujatha MadanSent: Wednesday, 8 October 2003 1:24 
PMTo: Multiple recipients of list ORACLE-LSubject: 
Unix Help
Hi,

Sorry for the 
slightly non-Oracle post.

I am after a 
UNIX code snippet that will help me copy archive logs to another directory 
BUT not if they already exist. So if only 2 archive logs are generated 
between script runs only the two new ones should copy. I know I can do this 
using sysdate - "time interval" but I am trying to avoid 
that.

Thanks in 
advance,

Sujatha 
Madan.


Unix Help

2003-10-07 Thread Sujatha Madan
Title: Message



Hi,

Sorry for the 
slightly non-Oracle post.

I am after a UNIX 
code snippet that will help me copy archive logs to another directory BUT not if 
they already exist. So if only 2 archive logs are generated between script runs 
only the two new ones should copy. I know I can do this using sysdate - "time 
interval" but I am trying to avoid that.

Thanks in 
advance,

Sujatha 
Madan.


IGNORE: Unix Help

2003-10-07 Thread Sujatha Madan
Title: Message



Sorry 
... but I solved it.

Cheers
Sujatha

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
  Sujatha MadanSent: Wednesday, 8 October 2003 1:24 
  PMTo: Multiple recipients of list ORACLE-LSubject: Unix 
  Help
  Hi,
  
  Sorry for the 
  slightly non-Oracle post.
  
  I am after a 
  UNIX code snippet that will help me copy archive logs to another directory BUT 
  not if they already exist. So if only 2 archive logs are generated between 
  script runs only the two new ones should copy. I know I can do this using 
  sysdate - "time interval" but I am trying to avoid 
  that.
  
  Thanks in 
  advance,
  
  Sujatha 
  Madan.


Unix help

2002-04-16 Thread Roland . Skoldblom

I have this unix script, please tell me how to change it so it also does the following:
counts the time between start time and end time of the process(I mean time difference 
between Jobb startat(Job started)  and Job Klart(Job Finished).


loadbilbo.sh:

#!/bin/sh
. /usr/bin/orasetup.sh
. /d31/appl/konto/bat/movefiles.sh
echo Jobb startat :\c /d31/appl/konto/log/laddabilbo.txt
date /d31/appl/konto/log/laddabilbo.txt
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/ehbgrupp.ctl 
log=/d31/appl/konto/log/ehbgrupp.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/kampanj.ctl 
log=/d31/appl/konto/log/kampanj.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/mxurval.ctl 
log=/d31/appl/konto/log/mxurval.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/load_arg.ctl 
log=/d31/appl/konto/log/load_arg.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/laddabsg.ctl 
log=/d31/appl/konto/log/laddabsg.log
sqlplus -s konto/icakort  !
set heading off
set verify off
set feedback off
set termout off
set pages 0
begin
konto.fillbilbotables.anrop;
END;
/
EXIT
!

echo -- 
/d31/appl/konto/log/laddabilbo.txt
echo ehbgrupp  status /d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/ehbgrupp.log /d31/appl/konto/log/laddabilbo.txt
echo -- 
/d31/appl/konto/log/laddabilbo.txt
echo -- 
/d31/appl/konto/log/laddabilbo.txt
echo kampanj  status /d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/kampanj.log /d31/appl/konto/log/laddabilbo.txt
echo -- 
/d31/appl/konto/log/laddabilbo.txt
echo -- 
/d31/appl/konto/log/laddabilbo.txt
echo mxurval  status /d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/mxurval.log /d31/appl/konto/log/laddabilbo.txt
echo -- 
/d31/appl/konto/log/laddabilbo.txt
echo -- 
/d31/appl/konto/log/laddabilbo.txt
echo load_arg  status /d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/load_arg.log /d31/appl/konto/log/laddabilbo.txt
echo -- 
/d31/appl/konto/log/laddabilbo.txt
echo -- 
/d31/appl/konto/log/laddabilbo.txt
echo laddabsg  status /d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/laddabsg.log /d31/appl/konto/log/laddabilbo.txt
echo -- 
/d31/appl/konto/log/laddabilbo.txt
echo Jobb klart! :\c /d31/appl/konto/log/laddabilbo.txt
date /d31/appl/konto/log/laddabilbo.txt


cat /d31/appl/konto/log/laddabilbo.txt | mailx -s Konto - Statusrapport 
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]






IThis log file is also sent by mail to people. I would like this log file only to be 
sent if there is anything wrong with the script(for instance if the database is down) 
So if the script goes fine, then no email will be sent.

The log file looks like this:


Jobb startat :Sun Apr 14 18:06:23 MEST 2002
--
ehbgrupp  status

Total logical records skipped:  0
Total logical records read:   400
Total logical records rejected: 0
Total logical records discarded:0

Run began on Sun Apr 14 18:06:23 2002
Run ended on Sun Apr 14 18:11:51 2002

Elapsed time was: 00:05:28.15
CPU time was: 00:00:00.07 (Ma
--
--
kampanj  status

Total logical records skipped:  0
Total logical records read:13
Total logical records rejected: 0
Total logical records discarded:0

Run began on Sun Apr 14 18:11:51 2002
Run ended on Sun Apr 14 18:12:44 2002

Elapsed time was: 00:00:52.52
CPU time was: 00:00:00.04 (Ma
--
--
mxurval  status

Total logical records skipped:  0
Total logical records read:  4829
Total logical records rejected: 0
Total logical records discarded:0

Run began on Sun Apr 14 18:12:44 2002
Run ended on Sun Apr 14 18:12:50 2002

Elapsed time was: 00:00:05.90
CPU time was: 00:00:00.18 (Ma
--
--
load_arg  status

Total logical records skipped:  0
Total logical records read:151613
Total logical records rejected: 0
Total logical records discarded:0

Run began on Sun Apr 14 18:12:50 2002
Run ended on Sun Apr 14 18:28:11 2002

Elapsed time was: 00:15:20.92
CPU time was: 

RE: Unix help

2002-04-16 Thread Grabowy, Chris

Yawn...

-Original Message-
Sent: Tuesday, April 16, 2002 10:08 AM
To: Multiple recipients of list ORACLE-L


I have this unix script, please tell me how to change it so it also does the
following:
counts the time between start time and end time of the process(I mean time
difference between Jobb startat(Job started)  and Job Klart(Job Finished).


loadbilbo.sh:

#!/bin/sh
. /usr/bin/orasetup.sh
. /d31/appl/konto/bat/movefiles.sh
echo Jobb startat :\c /d31/appl/konto/log/laddabilbo.txt
date /d31/appl/konto/log/laddabilbo.txt
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/ehbgrupp.ctl
log=/d31/appl/konto/log/ehbgrupp.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/kampanj.ctl
log=/d31/appl/konto/log/kampanj.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/mxurval.ctl
log=/d31/appl/konto/log/mxurval.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/load_arg.ctl
log=/d31/appl/konto/log/load_arg.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/laddabsg.ctl
log=/d31/appl/konto/log/laddabsg.log
sqlplus -s konto/icakort  !
set heading off
set verify off
set feedback off
set termout off
set pages 0
begin
konto.fillbilbotables.anrop;
END;
/
EXIT
!

echo --
/d31/appl/konto/log/laddabilbo.txt
echo ehbgrupp  status /d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/ehbgrupp.log
/d31/appl/konto/log/laddabilbo.txt
echo --
/d31/appl/konto/log/laddabilbo.txt
echo --
/d31/appl/konto/log/laddabilbo.txt
echo kampanj  status /d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/kampanj.log
/d31/appl/konto/log/laddabilbo.txt
echo --
/d31/appl/konto/log/laddabilbo.txt
echo --
/d31/appl/konto/log/laddabilbo.txt
echo mxurval  status /d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/mxurval.log
/d31/appl/konto/log/laddabilbo.txt
echo --
/d31/appl/konto/log/laddabilbo.txt
echo --
/d31/appl/konto/log/laddabilbo.txt
echo load_arg  status /d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/load_arg.log
/d31/appl/konto/log/laddabilbo.txt
echo --
/d31/appl/konto/log/laddabilbo.txt
echo --
/d31/appl/konto/log/laddabilbo.txt
echo laddabsg  status /d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/laddabsg.log
/d31/appl/konto/log/laddabilbo.txt
echo --
/d31/appl/konto/log/laddabilbo.txt
echo Jobb klart! :\c /d31/appl/konto/log/laddabilbo.txt
date /d31/appl/konto/log/laddabilbo.txt


cat /d31/appl/konto/log/laddabilbo.txt | mailx -s Konto - Statusrapport
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]






IThis log file is also sent by mail to people. I would like this log file
only to be sent if there is anything wrong with the script(for instance if
the database is down) So if the script goes fine, then no email will be
sent.

The log file looks like this:


Jobb startat :Sun Apr 14 18:06:23 MEST 2002
--
ehbgrupp  status

Total logical records skipped:  0
Total logical records read:   400
Total logical records rejected: 0
Total logical records discarded:0

Run began on Sun Apr 14 18:06:23 2002
Run ended on Sun Apr 14 18:11:51 2002

Elapsed time was: 00:05:28.15
CPU time was: 00:00:00.07 (Ma
--
--
kampanj  status

Total logical records skipped:  0
Total logical records read:13
Total logical records rejected: 0
Total logical records discarded:0

Run began on Sun Apr 14 18:11:51 2002
Run ended on Sun Apr 14 18:12:44 2002

Elapsed time was: 00:00:52.52
CPU time was: 00:00:00.04 (Ma
--
--
mxurval  status

Total logical records skipped:  0
Total logical records read:  4829
Total logical records rejected: 0
Total logical records discarded:0

Run began on Sun Apr 14 18:12:44 2002
Run ended on Sun Apr 14 18:12:50 2002

Elapsed time was: 00:00:05.90
CPU time was: 00:00:00.18 (Ma
--
--
load_arg  status

Total logical records skipped:  0
Total logical records read:151613
Total logical records rejected: 0
Total logical records discarded:0

Run began on Sun Apr 14 18:12:50 2002

Re: UNIX help needed for sed multi-line pattern space

2001-11-15 Thread Ron Rogers

Alan,
 What do you mean the file is to large for vi?  If you are going to string the lines 
together be sure that you don't overrun the linitations of the server input line 
length. If you need to have continuations in the line I think that the \ tells the 
server the command is continued on the next line.
 Check the server manufacturer's site for support discussions.
ROR mª¿ªm

 [EMAIL PROTECTED] 11/15/01 12:55PM 
If I have the following two-line sql statement in a file:

SELECT A,B,C FROM TABLE1
WHERE A=1;

and want to create a single line, I could use the following sed script:

/[^;]$/{
 N
 s/\n/ /
}

which would produce:

SELECT A,B,C FROM TABLE1 WHERE A=1;

What would my sed script look like if there were 2, 3, or even 4
continuation lines (unknown number of lines)?
Note that the file is too large for vi.
Any good UNIX sites where I could post UNIX questions?

Thanx,

Alan Martin
Principal Consultant
Defense Logistics Information Service
[EMAIL PROTECTED] 



--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Ron Rogers
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: UNIX help needed for sed multi-line pattern space

2001-11-15 Thread chris . w . johnson
Title: UNIX help needed for sed multi-line pattern space



Alan,

Why not use awk?

cat filename | awk '{if ( 
substr($0,length($0),1) == ";") {print " " $0 } else {printf($0) 
}}'

Hope this helps

Chris



  -Original Message-From: Martin, Alan 
  [mailto:[EMAIL PROTECTED]]Sent: 15 November 2001 
  17:55To: Multiple recipients of list ORACLE-LSubject: 
  UNIX help needed for sed multi-line pattern space
  If I have the following two-line sql statement in a 
  file: 
  SELECT A,B,C FROM TABLE1 WHERE A=1; 
  and want to create a single line, I could use the 
  following sed script: 
  /[^;]$/{ N s/\n/ / 
  } 
  which would produce: 
  SELECT A,B,C FROM TABLE1 WHERE A=1; 
  What would my sed script look like if there were 2, 
  3, or even 4 continuation lines (unknown number of lines)? Note that the file is too large for vi. Any good UNIX sites where I could post UNIX 
  questions? 
  Thanx, 
  Alan 
  Martin Principal Consultant Defense Logistics Information Service [EMAIL PROTECTED]