RE: UNIX : script help/input

2003-10-02 Thread Jamadagni, Rajendra
Title: RE: UNIX : script help/input





XOR  that gives me some painful memories in recent days ... xor is possible in pl/sql but needs a little work. I migrated a C encryption code to pl/sql and then use utl_tcp to sent it to our router which feeds the modem banks.

This is how I worked on it ... but I was working on character by character ...


xor(a,b) is
r_a := utl_raw.cast_to_raw(chr(a));
r_b := utl_raw.cast_to_raw(chr(b));
n_xor := to_number(utl_raw.bit_xor(r_a,r_b),'');



Of course the manual doesn't tell you this ... 


Raj

Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !



-Original Message-
From: Jared Still [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 01, 2003 6:29 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: UNIX : script help/input



 Good! The more the merrier! Welcome to the club.


Oh most definitely.


As I just finished writing a prototype package for assigning MAC
addresses ( we make network stuff - that's a technical term ), I
have endured the agonies of doing hex math in PL/SQL.


I finally bit the bullet and used string manipulation to convert
hex to decimal and do what I needed that way. Couldn't get BITAND
to work properly on very large integers. Besides, doing XOR with
BITAND in PL/SQL is very painful.


UTL_RAW has an XOR, but it requires RAW values and I didn't feel
like messing with it.


This is all very simple in Perl.


Given a MAC of 5AA, with a fixed portion of 500,
it is very easy to determine the variable portion of the address
via $x = 0x5AA ^ 500.


Not quite so simple in PL/SQL.


Jared



This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*2


RE: UNIX : script help/input

2003-10-02 Thread Norris, Gregory T [ITS]
 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.

It looks like this would make a *great* example for the Stupid Email Disclaimers site 
http://www.goldmark.org/jeff/stupid-disclaimers/list.html.

--
My employers like me, but not enough to let me speak for them.

Greg Norris
Sprint LTD Database Administration
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Norris, Gregory T [ITS]
  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 : script help/input

2003-10-02 Thread Don Yu
Johan:

Please see the attachment file, which is my script for everyday web
server log file and uses nslookup to process the results. Hope that it
is helpful.

Don


Johan Muller wrote:

 Anybody with a quick and dirty (elegant would be nice too), to munge
 output from a nslookup output file to a delimited file?

 'File content:

 Server:  dns1.mci.com
 Address:  199.249.19.1

 Name:WCOM-4NXZGAPWY5.mcilink.com
 Address:  166.50.73.209

 Delimited file should have the following line(s);  (using | or
 whatever as delimiter):

 '166.50.73.209'|'4NXZGAPWY5.mcilink.com'.

 Required for both single and multiple records.



 TIA
#! /bin/ksh
# file name: log_file_parsing
# Date: March 6,2003; Mar 7,2003; Mar 10,2003; Mar 13,2003; May 7,2003; 12 May,2003; 
May 15,2003; 
#   May 20,2003; May 30,2003
#
# Author: Don Y.
# Desc: an example of parsing netTracker related web access from web server 
(www.welch.jhu.edu) access 
#   log file. Extract client IP, access date, and host IP. This script also 
transfer client IP
#   with alphabet  into digital one by issuing nslookup command call. Finally make 
nslookup work
#   for it outputs a few lines instead of one line.  
#

# define output file
WORKING_DIR=$1
OUTPUT_FILE=$WORKING_DIR/log_file_parsing_output.temp
INPUT_FILE=$WORKING_DIR/$2
TEMP_NAME=$3
SCRIPT_HOME=/export/users/dony/report

# check input access log file exists or not under $WORKING_DIR
if [ ! -f $WORKING_DIR/$2 ]
then
echo input access log file doesn't exist at working directory!
exit 1
fi

# check output file under working directory exist or not : 
$WORKING_DIR/log_file_parsing_output.temp
if [ ! -f $WORKING_DIR/log_file_parsing_output.temp ]
then
touch $WORKING_DIR/log_file_parsing_output.temp
chown dony:staff $WORKING_DIR/log_file_parsing_output.temp
fi

# check all temporary files exist or not
if [ -f $WORKING_DIR/log_file_parsing_temp01.temp ]
then
rm $WORKING_DIR/log_file_parsing_temp01.temp
else
# create an empty file with owner status: dony:staff
touch $WORKING_DIR/log_file_parsing_temp01.temp
chown dony:staff $WORKING_DIR/log_file_parsing_temp01.temp
fi

if [ -f $WORKING_DIR/log_file_parsing_temp02.temp ]
then
rm $WORKING_DIR/log_file_parsing_temp02.temp
else
touch $WORKING_DIR/log_file_parsing_temp02.temp
chown dony:staff $WORKING_DIR/log_file_parsing_temp02.temp
fi

# file parsing for NetTracker associated lines
success=0
cat $INPUT_FILE | grep /cgi-bin/ntlinktrack.cgi | awk '{print 
$1,substr($4,2,11),$7}' | sed 's/\/cgi-bin\/ntlinktrack.cgi?//'  
$WORKING_DIR/log_file_parsing_temp01.temp
let success=success+$?
sed 's/http:\/\/www.welch.jhu.edu\/cgi-bin\/ntlinktrack.cgi?//' 
$WORKING_DIR/log_file_parsing_temp01.temp  $WORKING_DIR/log_file_parsing_temp02.temp
let success=success+$?

# get start line number here
whole_parsing_start_line=`cat $OUTPUT_FILE | wc -l`

# change the date format
for arg_each_line in `cat $WORKING_DIR/log_file_parsing_temp02.temp | awk '{ print 
$1===$2===$3 }'`
do
one_line=`echo $arg_each_line | sed 's/===/ /g'`
# debug one line below if enabled
#echo $one_line  $WORKING_DIR/log_file_parsing_temp03.temp
client_ip=`echo $one_line | awk '{ print $1 }' | sed 's/ //g'`
org_date=`echo $one_line | awk '{ print $2 }' | sed 's/ //g'`
oracle_date=`$SCRIPT_HOME/ldate $org_date`
host_ip=`echo $one_line | awk '{ print $3 }' | sed 's/ //g'`
# transfer client_ip from alphabet to digital
client_addr=`echo $client_ip | egrep -i -e [a-z] | sed 's/ //g'`
# get the length of client_addr
LENGTH=`expr $client_addr : '.*'`
if [ $LENGTH -gt 8 ]
then
# add pattern of [1-9][1-9] for parsing since nslookup output might be 
changed 
/usr/sbin/nslookup $client_addr 2 $WORLING_DIR/$TEMP_NAME | awk '{ 
print $2 }' | egrep -e [0-9]'.'[0-9]'.'  nslookup_result
NSR_LINES=`cat nslookup_result | wc -l`
if [ $NSR_LINES -eq 2 ];then
client_digit=`cat nslookup_result 2 $WORLING_DIR/$TEMP_NAME | 
awk '( NR == 2 ) { print $0 }'`
elif [ $NSR_LINES -eq 3 ];then
client_digit=`cat nslookup_result 2 $WORLING_DIR/$TEMP_NAME | 
awk '( NR == 3 ) { print $0 }'`
fi
# remove the result file
rm nslookup_result 2 $WORLING_DIR/$TEMP_NAME
# check whether or not the nslookup command gets a result,which it 
should be larger than 8
LENGTH=`expr $client_digit : '.*'`
if [ $LENGTH -gt 8 ]
then
client_ip=$client_digit
fi
fi
# output the result
echo $client_ip $oracle_date $host_ip  $OUTPUT_FILE
let success=success+$?
done 

# get whole NetTracker related lines
whole_NetTracker_lines=`cat 

RE: UNIX : script help/input

2003-10-02 Thread Jared . Still

Raj,

I did consider doing it this way, but the thought of writing stuff to the
bit level for a prototype was just too painful.

Left pad with zeroes, take a substring, feed it to the handy-dandy
hex/oct/bin/dec converter package - much easier.

Jared








Jamadagni, Rajendra [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
10/02/2003 05:54 AM
Please respond to ORACLE-L


To:Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
cc:
Subject:RE: UNIX : script help/input


XOR  that gives me some painful memories in recent days ... xor is possible in pl/sql but needs a little work. I migrated a C encryption code to pl/sql and then use utl_tcp to sent it to our router which feeds the modem banks.
This is how I worked on it ... but I was working on character by character ... 
xor(a,b) is 
r_a := utl_raw.cast_to_raw(chr(a)); 
r_b := utl_raw.cast_to_raw(chr(b)); 
n_xor := to_number(utl_raw.bit_xor(r_a,r_b),''); 

Of course the manual doesn't tell you this ... 
Raj 
 
Rajendra dot Jamadagni at nospamespn dot com 
All Views expressed in this email are strictly personal. 
QOTD: Any clod can have facts, having an opinion is an art ! 

-Original Message- 
Sent: Wednesday, October 01, 2003 6:29 PM 
To: Multiple recipients of list ORACLE-L 

 Good! The more the merrier! Welcome to the club. 
Oh most definitely. 
As I just finished writing a prototype package for assigning MAC 
addresses ( we make network stuff - that's a technical term ), I 
have endured the agonies of doing hex math in PL/SQL. 
I finally bit the bullet and used string manipulation to convert 
hex to decimal and do what I needed that way. Couldn't get BITAND 
to work properly on very large integers. Besides, doing XOR with 
BITAND in PL/SQL is very painful. 
UTL_RAW has an XOR, but it requires RAW values and I didn't feel 
like messing with it. 
This is all very simple in Perl. 
Given a MAC of 5AA, with a fixed portion of 500, 
it is very easy to determine the variable portion of the address 
via $x = 0x5AA ^ 500. 
Not quite so simple in PL/SQL. 
Jared 

encoded content removed -- binaries not allowed by ListGuru

RE: UNIX : script help/input

2003-10-02 Thread Jamadagni, Rajendra



unfortunately we _had_ to do it in pl/sql ... it is part of the encrypted 
feed that we send out to our clients ... it is decoded by a 
chip.

Oh 
well  I am back to array of references ...

Raj

  -Original Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]Sent: Thursday, October 02, 2003 
  2:20 PMTo: Multiple recipients of list ORACLE-LSubject: 
  RE: UNIX : script help/inputRaj, I did consider doing 
  it this way, but the thought of writing stuff to the bit level for a prototype was just too painful. 
  Left pad with zeroes, take a substring, 
  feed it to the handy-dandy hex/oct/bin/dec converter package - much easier. Jared 
  


  
  "Jamadagni, Rajendra" 
[EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 
10/02/2003 05:54 AM 
Please respond to ORACLE-L 
  To:   
 Multiple recipients of list ORACLE-L 
[EMAIL PROTECTED] cc:

 Subject:    RE: UNIX : script 
help/inputXOR  that gives me some painful memories in recent days ... xor is 
  possible in pl/sql but needs a little work. I migrated a "C" encryption code 
  to pl/sql and then use utl_tcp to sent it to our router which feeds the 
  modem banks. 
  This is how I worked on it ... but I 
  was working on character by character ... 
  xor(a,b) is r_a := utl_raw.cast_to_raw(chr(a)); r_b := utl_raw.cast_to_raw(chr(b)); n_xor := to_number(utl_raw.bit_xor(r_a,r_b),''); 
  
  Of course the manual doesn't tell you 
  this ... 
  Raj  Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly 
  personal. QOTD: Any clod can have facts, having an 
  opinion is an art ! 
  
  -Original Message- Sent: Wednesday, October 01, 2003 6:29 PM To: Multiple recipients of list ORACLE-L 
  
   Good! The more the merrier! 
  Welcome to the club. 
  Oh most definitely. 
  As I just finished writing a prototype 
  package for assigning MAC 
  addresses ( we make network 
  stuff - that's a technical term ), I have endured the 
  agonies of doing hex math in PL/SQL. 
  I finally bit the bullet and used 
  string manipulation to convert 
  hex to decimal and do what I 
  needed that way. Couldn't get BITAND to work properly on 
  very large integers. Besides, doing XOR with BITAND in PL/SQL is very painful. 
  UTL_RAW has an XOR, but it requires RAW 
  values and I didn't feel 
  like messing with 
  it. 
  This is all very simple in 
  Perl. 
  Given a MAC of 5AA, with a 
  fixed portion of 500, 
  it is very easy to determine 
  the variable portion of the address 
  via $x = 0x5AA ^ 
  500. 
  Not quite so simple in 
  PL/SQL. 
  Jared 
  
  


Re: UNIX : script help/input

2003-10-02 Thread Vladimir Begun
[EMAIL PROTECTED] wrote:
Left pad with zeroes, take a substring, feed it to the handy-dandy
hex/oct/bin/dec converter package - much easier.
Jared, what Oracle edition do you use? I'm asking because you might
want to consider not to use 'handy-dandy' hex/oct/bin/dec converter
package, but TO_CHAR/TO_NUMBER in case it's = 8i -- it would work
faster.
SELECT TO_NUMBER(SUBSTR('0x50AA', -6), 'FM0X') dec
 , '0x' || TO_CHAR(170, 'FM0X') hex
  FROM dual
/
--
Vladimir Begun
The statements and opinions expressed here are my own and
do not necessarily represent those of Oracle Corporation.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Vladimir Begun
 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 : script help/input

2003-10-02 Thread Vladimir Begun
Jamadagni, Rajendra wrote:
unfortunately we _had_ to do it in pl/sql ... it is part of the 
encrypted feed that we send out to our clients ... it is decoded by a chip.
 
Oh well  I am back to array of references ...
I'd suggest to consider external C function -- it's faster, it's
easier to write especially when you need to work with bits, shifts
etc.. I've recently implemented crc32 for some internal project --
works well, obviously faster than SQL, PL/SQL and native comp of
PL/SQL code. Native comp. is also good to consider, if it's 9i.
Sure, it depends...
--
Vladimir Begun
The statements and opinions expressed here are my own and
do not necessarily represent those of Oracle Corporation.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Vladimir Begun
 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 : script help/input

2003-10-02 Thread Jamadagni, Rajendra
Title: RE: UNIX : script help/input






it was actually C code ... but because data is going on a modem, the pl/sql speed is acceptable (in fact we have to _wait_ after sending out each message). Had fun doing that though ... it is critical, tied to our SLA ... so must be up all the time. I'd rather handle exceptions in pl/sql than in C.

Raj


-Original Message-
From: Vladimir Begun [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 02, 2003 3:35 PM
To: Multiple recipients of list ORACLE-L
Subject: Re: UNIX : script help/input



Jamadagni, Rajendra wrote:
 unfortunately we _had_ to do it in pl/sql ... it is part of the 
 encrypted feed that we send out to our clients ... it is decoded by a chip.
 
 Oh well  I am back to array of references ...


I'd suggest to consider external C function -- it's faster, it's
easier to write especially when you need to work with bits, shifts
etc.. I've recently implemented crc32 for some internal project --
works well, obviously faster than SQL, PL/SQL and native comp of
PL/SQL code. Native comp. is also good to consider, if it's 9i.
Sure, it depends...
-- 
Vladimir Begun
The statements and opinions expressed here are my own and
do not necessarily represent those of Oracle Corporation.


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Vladimir Begun
 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).



This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*2


Re: UNIX : script help/input

2003-10-02 Thread Jared . Still

This database is 8i.

I would probably still use the package, as it does octal, hex and binary
as well as base 36 and 64. 

Jared








Vladimir Begun [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
10/02/2003 12:24 PM
Please respond to ORACLE-L


To:Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
cc:
Subject:Re: UNIX : script help/input


[EMAIL PROTECTED] wrote:
 Left pad with zeroes, take a substring, feed it to the handy-dandy
 hex/oct/bin/dec converter package - much easier.

Jared, what Oracle edition do you use? I'm asking because you might
want to consider not to use 'handy-dandy' hex/oct/bin/dec converter
package, but TO_CHAR/TO_NUMBER in case it's = 8i -- it would work
faster.

SELECT TO_NUMBER(SUBSTR('0x50AA', -6), 'FM0X') dec
   , '0x' || TO_CHAR(170, 'FM0X') hex
  FROM dual
/
-- 
Vladimir Begun
The statements and opinions expressed here are my own and
do not necessarily represent those of Oracle Corporation.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Vladimir Begun
 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 : script help/input

2003-10-02 Thread Jared . Still

I would be tempted to use Java for this rather than C.

Much more portable than external procedures, an important distinction
in a heterogenous shop.

Jared







Vladimir Begun [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
10/02/2003 12:34 PM
Please respond to ORACLE-L


To:Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
cc:
Subject:Re: UNIX : script help/input


Jamadagni, Rajendra wrote:
 unfortunately we _had_ to do it in pl/sql ... it is part of the 
 encrypted feed that we send out to our clients ... it is decoded by a chip.
 
 Oh well  I am back to array of references ...

I'd suggest to consider external C function -- it's faster, it's
easier to write especially when you need to work with bits, shifts
etc.. I've recently implemented crc32 for some internal project --
works well, obviously faster than SQL, PL/SQL and native comp of
PL/SQL code. Native comp. is also good to consider, if it's 9i.
Sure, it depends...
-- 
Vladimir Begun
The statements and opinions expressed here are my own and
do not necessarily represent those of Oracle Corporation.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Vladimir Begun
 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 : script help/input

2003-10-01 Thread Stephane Faroult

Anybody with a quick and dirty (elegant would be
nice too), to munge output from a nslookup output
file to a delimited file?

'File content:

Server:  dns1.mci.com
Address:  199.249.19.1

Name:WCOM-4NXZGAPWY5.mcilink.com
Address:  166.50.73.209

Delimited file should have the following line(s); 
(using | or whatever as delimiter):

'166.50.73.209'|'4NXZGAPWY5.mcilink.com'.

Required for both single and multiple records.

 

TIA

awk 'BEGIN{ok=0;}\
 {if (($1 == Address:)  ok)\
 {printf(%s|%s\n, $2, name);ok=0;}\
  else {if ($1 == Name:)\
   {name = $2; ok = 1;}}}' your_file_here

Don't understand your 'single' and 'multiple' records too well but it should get you 
started.

Regards,

Stephane Faroult
Oriole
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Faroult
  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 : script help/input

2003-10-01 Thread Joe Testa
I supposed if you send to a file, we can read it using ORACLE to parse 
it w/plsql and then using utl_file write it back out but seems like 
overkill to use oracle for that, but then again this is an oracle list, 
so i'll have to assume thats what you wanted, anyone up for the task :)

joe

Johan Muller wrote:

Anybody with a quick and dirty (elegant would be nice too), to munge 
output from a nslookup output file to a delimited file?

'File content:

Server:  dns1.mci.com
Address:  199.249.19.1
Name:WCOM-4NXZGAPWY5.mcilink.com
Address:  166.50.73.209
Delimited file should have the following line(s);  (using | or 
whatever as delimiter):

'166.50.73.209'|'4NXZGAPWY5.mcilink.com'.

Required for both single and multiple records.

 

TIA

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Joe Testa
 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 : script help/input

2003-10-01 Thread Mladen Gogala
#!/usr/bin/perl -w
use strict;
use bytes;
my ($NAME,$IP,@LB);
while () {
chomp;
@LB=split /\s+/;
if ($LB[0] =~ /^name:/i) {
   $NAME=$LB[1];
   }
if ($LB[0] =~ /^address:/i) {
   $IP=$LB[1];
   write;
   }
}
format STDOUT=
@ ,@
$NAME,$IP


Re: UNIX : script help/input

2003-10-01 Thread Johan Muller

Mladen,

It worked! 

Heartfelt thank you from the evangelized perl crowd (now watch the list-owner grin).Mladen Gogala [EMAIL PROTECTED] wrote:
#!/usr/bin/perl -wuse strict;use bytes;my ($NAME,$IP,@LB);while () {chomp;@LB=split /\s+/;if ($LB[0] =~ /^name:/i) {$NAME=$LB[1];}if ($LB[0] =~ /^address:/i) {$IP=$LB[1];write;}}format STDOUT=@ ,@$NAME,$IP

Re: UNIX : script help/input

2003-10-01 Thread Mladen Gogala
On Wed, 2003-10-01 at 13:24, Johan Muller wrote:
 Mladen,
  
 It worked! 
  

Did you have any doubts? That's precisely what perl is good for.





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: UNIX : script help/input

2003-10-01 Thread Tanel Poder



Thank God for Perl and Mladen ;)

Tanel.

- Original Message - 

  From: 
  Johan Muller 
  
  To: Multiple recipients of list ORACLE-L 
  
  Sent: Wednesday, October 01, 2003 8:24 
  PM
  Subject: Re: UNIX : script 
  help/input
  
  
  Mladen,
  
  It worked! 
  
  Heartfelt thank you from the evangelized perl crowd (now watch the 
  list-owner grin).Mladen Gogala [EMAIL PROTECTED] 
  wrote:
  #!/usr/bin/perl 
-wuse strict;use bytes;my ($NAME,$IP,@LB);while () 
{chomp;@LB=split /\s+/;if ($LB[0] =~ /^name:/i) 
{$NAME=$LB[1];}if ($LB[0] =~ /^address:/i) 
{$IP=$LB[1];write;}}format 
STDOUT=@ 
,@$NAME,$IP


RE: UNIX : script help/input

2003-10-01 Thread Jamadagni, Rajendra



Funny 
.. I am currently sitting in a Perl class, so I can actually read what MG has 
written. I'll be soon Perl-literate ...

Raj

  -Original Message-From: Tanel Poder 
  [mailto:[EMAIL PROTECTED]Sent: Wednesday, October 01, 2003 
  1:35 PMTo: Multiple recipients of list ORACLE-LSubject: 
  Re: UNIX : script help/input
  Thank God for Perl and Mladen ;)
  
  Tanel.
  
  - Original Message - 
  
From: 
Johan 
Muller 
To: Multiple recipients of list ORACLE-L 

Sent: Wednesday, October 01, 2003 8:24 
PM
Subject: Re: UNIX : script 
help/input


Mladen,

It worked! 

Heartfelt thank you from the evangelized perl crowd (now watch the 
list-owner grin).Mladen Gogala [EMAIL PROTECTED] 
wrote:
#!/usr/bin/perl 
  -wuse strict;use bytes;my ($NAME,$IP,@LB);while () 
  {chomp;@LB=split /\s+/;if ($LB[0] =~ /^name:/i) 
  {$NAME=$LB[1];}if ($LB[0] =~ /^address:/i) 
  {$IP=$LB[1];write;}}format 
  STDOUT=@ 
  ,@$NAME,$IP
This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*2


Re: UNIX : script help/input

2003-10-01 Thread Jared Still

:)

On Wed, 2003-10-01 at 10:24, Johan Muller wrote:
 Mladen,
  
 It worked! 
  
 Heartfelt thank you from the evangelized perl crowd (now watch the list-owner grin).
 
 Mladen Gogala [EMAIL PROTECTED] wrote:
 #!/usr/bin/perl -w
 use strict;
 use bytes;
 my ($NAME,$IP,@LB);
 while () {
 chomp;
 @LB=split /\s+/;
 if ($LB[0] =~ /^name:/i) {
 $NAME=$LB[1];
 }
 if ($LB[0] =~ /^address:/i) {
 $IP=$LB[1];
 write;
 }
 }
 format STDOUT=
 @ ,@
 $NAME,$IP


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jared Still
  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 : script help/input

2003-10-01 Thread Govindan K


Thank God for Jared -Original Message-





From: Tanel PoderSent: 10/1/2003 10:37:55 AMTo: [EMAIL PROTECTED]Subject: Re: UNIX : script help/input



Thank God for Perl and Mladen ;)

Tanel.

- Original Message - 

From: Johan Muller 
To: Multiple recipients of list ORACLE-L 
Sent: Wednesday, October 01, 2003 8:24 PM
Subject: Re: UNIX : script help/input


Mladen,

It worked! 

Heartfelt thank you from the evangelized perl crowd (now watch the list-owner grin).Mladen Gogala [EMAIL PROTECTED] wrote:
#!/usr/bin/perl -wuse strict;use bytes;my ($NAME,$IP,@LB);while () {chomp;@LB=split /\s+/;if ($LB[0] =~ /^name:/i) {$NAME=$LB[1];}if ($LB[0] =~ /^address:/i) {$IP=$LB[1];write;}}format STDOUT=@ ,@$NAME,$IP

___Get Your 10MB account for FREE at http://mail.arabia.com !Access MILLIONS of JOBS NOW!

RE: UNIX : script help/input

2003-10-01 Thread Mladen Gogala
On Wed, 2003-10-01 at 14:34, Jamadagni, Rajendra wrote:
 Funny .. I am currently sitting in a Perl class, so I can actually
 read what MG has written. I'll be soon Perl-literate ...
  
 Raj

Good! The more the merrier! Welcome to the club.




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: UNIX : script help/input

2003-10-01 Thread Jared Still
Why thank you.  :)

On Wed, 2003-10-01 at 13:29, Govindan K wrote:
 Thank God for Jared 
 
 -Original Message-
 
From: Tanel Poder
 Sent: 10/1/2003 10:37:55 AM
 To: [EMAIL PROTECTED]
 
 
 Thank God for Perl and Mladen ;)
  
 Tanel.
  
 - Original Message - 
 
   From: Johan Muller mailto:[EMAIL PROTECTED]  
   To: Multiple recipients of list ORACLE-L
 mailto:[EMAIL PROTECTED]  
   Sent: Wednesday, October 01, 2003 8:24 PM
   Subject: Re: UNIX : script help/input
 
   Mladen,

   It worked! 

   Heartfelt thank you from the evangelized perl crowd (now watch
 the list-owner grin).
   
   Mladen Gogala  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]  wrote:
 
   #!/usr/bin/perl -w
   use strict;
   use bytes;
   my ($NAME,$IP,@LB);
   while () {
   chomp;
   @LB=split /\s+/;
   if ($LB[0] =~ /^name:/i) {
   $NAME=$LB[1];
   }
   if ($LB[0] =~ /^address:/i) {
   $IP=$LB[1];
   write;
   }
   }
   format STDOUT=
   @ ,@
   $NAME,$IP
 
 
 ___
 Get Your 10MB account for FREE at http://mail.arabia.com !
 Access MILLIONS of JOBS NOW!
 http://ads.arabia.com/?SHT=text_email_english 


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jared Still
  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 : script help/input

2003-10-01 Thread Jared Still
 Good! The more the merrier! Welcome to the club.

Oh most definitely.

As I just finished writing a prototype package for assigning MAC
addresses ( we make network stuff - that's a technical term ), I
have endured the agonies of doing hex math in PL/SQL.

I finally bit the bullet and used string manipulation to convert
hex to decimal and do what I needed that way.  Couldn't get BITAND
to work properly on very large integers. Besides, doing XOR with
BITAND in PL/SQL is very painful.

UTL_RAW has an XOR, but it requires RAW values and I didn't feel
like messing with it.

This is all very simple in Perl.

Given a MAC of 5AA, with a fixed portion of 500,
it is very easy to determine the variable portion of the address
via $x = 0x5AA ^ 500.

Not quite so simple in PL/SQL.

Jared





On Wed, 2003-10-01 at 14:44, Mladen Gogala wrote:
 On Wed, 2003-10-01 at 14:34, Jamadagni, Rajendra wrote:
  Funny .. I am currently sitting in a Perl class, so I can actually
  read what MG has written. I'll be soon Perl-literate ...
   
  Raj
 

 
 
 
 
 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).
 


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jared Still
  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 : script help/input

2003-10-01 Thread Vladimir Begun
Jared

Jared Still wrote:
Good! The more the merrier! Welcome to the club.
Oh most definitely.

As I just finished writing a prototype package for assigning MAC
addresses ( we make network stuff - that's a technical term ), I
have endured the agonies of doing hex math in PL/SQL.
I finally bit the bullet and used string manipulation to convert
hex to decimal and do what I needed that way.  Couldn't get BITAND
to work properly on very large integers. Besides, doing XOR with
BITAND in PL/SQL is very painful.
BITAND in PL/SQL works for INTEGER/PLS_INTEGER only.

UTL_RAW has an XOR, but it requires RAW values and I didn't feel
like messing with it.
This is all very simple in Perl.
Sure!

Given a MAC of 5AA, with a fixed portion of 500,
it is very easy to determine the variable portion of the address
via $x = 0x5AA ^ 500.
Not quite so simple in PL/SQL.
Globally unique addresses are allocated by the IEEE in blocks containing 2^24
(16,777,216) addresses. In each allocation, the first 3 octects are fixed (e.g.
00-00-0C is Cisco) and the last three octects are variable (e.g. 00-00-00
through FF-FF-FF). The fixed portion of the allocation is known formally as the
Organizationally Unique Identifier (OUI), and infomally as the Ethernet Vendor
ID. Often, the OUI portion of a MAC address is extremely helpful in indentifying
which physical piece of equipment is generating a particular packet.
00-00-50 is for RADISYS CORPORATION, right?

x := SUBSTR('0x50AA', -6);

Then you can use BITAND. However, I'm not saying that PL/SQL is better
than perl -- every language has its own purpose.
--
Vladimir Begun
The statements and opinions expressed here are my own and
do not necessarily represent those of Oracle Corporation.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Vladimir Begun
 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 script quetion: to replace $ with \$

2003-02-03 Thread Stephen Lee

echo '123$456$789' | sed 's/\$/\\\$/g'
123\$456\$789

Why?  The $ means end of line to sed; so you have to quote it too.


 -Original Message-
 Maybe there is another syntax that I should use? TIA.
 
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephen Lee
  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 script to stop pwd-protected listener

2002-10-11 Thread Michal Zaschke
Hi,

we have lsnrctl with 750 and listener.ora with 600 permissions and
everything runs fine. For job stopping process you can then use the
encrypted password wirtten in listener.ora.

HTH,
 Mike


[EMAIL PROTECTED] wrote:
 
 Hi,
 Solaris 8, Oracle 9i listener
 
 It seems that anyone who has a login on Solaris can shut the listener down. I have 
tried with a non-dba userid and could stop the listener.
 
 The default file permission for ORACLE_HOME/bin/lsnrctl is 751, and for 
ORACLE_HOME/network/admin/listener.ora file  is 644. I asked Oracle if I could change 
them to 750 and 640 respectively and they said that you should not change the
 defaults since they are verified against the system.
 
 So I password protected it. However to stop a password-protect listener you need to 
do the following interactively: run lsnrctl, issue set password command, put in the 
password, issue stop, issue exit.
 
 I need to implement this stop in a Shell script so that I can call the script at the 
server reboot time. Do you know how to supply a password to lsnrctl set password 
command in a script? Have attempted with the script but have not got it
 worked yet.
 
 Thanks
 Long
 
 --
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 --
 Author:
   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).

-- 
 Ing. Michal Zaschke
   DB Administrator
Sokolovska uhelna, a.s.
phone: +420 352 465417
e-mail: [EMAIL PROTECTED]
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Michal Zaschke
  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 script to stop password-protected listener

2002-10-09 Thread Gilles PARC

Hi Michal,

It's a security breach and bug #2366907
has been opened for that.
So protect carefully your listener.ora file from non privileged 
readers.

Regards

At 01:53 08/10/2002 -0800, you wrote:
Yes, you can change your listener.ora file permission up to 600 on the
server side. In a shell script you can then use encrypted password found
in listener.ora on line PASSWORDS_listener.

lsnrctl EOF
set password C6C144CF750E3CA5
stop
exit
EOF

If the password is not in the listener.ora file, run lsnrctl, set
password manualy and execute SAVE_CONFIG. This will write a line into
your listener.ora file with the encrypted password.

HTH,
   Mike


Gilles Parc

carpe diem !!
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gilles PARC
  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 script to stop password-protected listener

2002-10-08 Thread Michal Zaschke

Yes, you can change your listener.ora file permission up to 600 on the
server side. In a shell script you can then use encrypted password found
in listener.ora on line PASSWORDS_listener.

lsnrctl EOF
set password C6C144CF750E3CA5
stop
exit
EOF

If the password is not in the listener.ora file, run lsnrctl, set
password manualy and execute SAVE_CONFIG. This will write a line into
your listener.ora file with the encrypted password.

HTH,
   Mike


Choudhary Rajendra (TTL_LKO) pe:
 
 Hi ,
We can very well protect the Server side executables by changing the
 permission of the
file . We had implemented this on all our database sites and normal
 user don't have access
to lsnrctl,svrmgrl,namesctl etc .You can also protect the
 listener.ora file by changing the
permission to 770 or 700 as applicable to your environment . The
 sqlnet.ora file need to
be given read access to all and also the tnsnames.ora file (If you
 have not gone for nameserver) .
 
 Regards
 Rajendra
 
 -Original Message-
 Sent: Tuesday, October 08, 2002 11:13 AM
 To: Multiple recipients of list ORACLE-L
 
 Hi,
 Solaris 8, Oracle 9i listener
 
 It seems that anyone who has a login on Solaris can shut the listener down.
 I have tried with a non-dba userid and could stop the listener.
 
 The default file permission for ORACLE_HOME/bin/lsnrctl is 751, and for
 ORACLE_HOME/network/admin/listener.ora file  is 644. I asked Oracle if I
 could change them to 750 and 640 respectively and they said that you should
 not change the
 defaults since they are verified against the system.
 
 So I password protected it. However to stop a password-protect listener you
 need to do the following interactively: run lsnrctl, issue set password
 command, put in the password, issue stop, issue exit.
 
 I need to implement this stop in a Shell script so that I can call the
 script at the server reboot time. Do you know how to supply a password to
 lsnrctl set password command in a script? Have attempted with the script but
 have not got it
 worked yet.
 
 Thanks
 Long
 
 --
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 --
 Author:
   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.com
 --
 Author: Choudhary Rajendra (TTL_LKO)
   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).

-- 
 Ing. Michal Zaschke
   DB Administrator
Sokolovska uhelna, a.s.
phone: +420 352 465417
e-mail: [EMAIL PROTECTED]
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Michal Zaschke
  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 script to stop password-protected listener

2002-10-07 Thread Choudhary Rajendra (TTL_LKO)

Hi , 
   We can very well protect the Server side executables by changing the
permission of the 
   file . We had implemented this on all our database sites and normal
user don't have access 
   to lsnrctl,svrmgrl,namesctl etc .You can also protect the
listener.ora file by changing the 
   permission to 770 or 700 as applicable to your environment . The
sqlnet.ora file need to 
   be given read access to all and also the tnsnames.ora file (If you
have not gone for nameserver) . 

Regards
Rajendra  

-Original Message-
Sent: Tuesday, October 08, 2002 11:13 AM
To: Multiple recipients of list ORACLE-L


Hi,
Solaris 8, Oracle 9i listener

It seems that anyone who has a login on Solaris can shut the listener down.
I have tried with a non-dba userid and could stop the listener.

The default file permission for ORACLE_HOME/bin/lsnrctl is 751, and for
ORACLE_HOME/network/admin/listener.ora file  is 644. I asked Oracle if I
could change them to 750 and 640 respectively and they said that you should
not change the
defaults since they are verified against the system.

So I password protected it. However to stop a password-protect listener you
need to do the following interactively: run lsnrctl, issue set password
command, put in the password, issue stop, issue exit.

I need to implement this stop in a Shell script so that I can call the
script at the server reboot time. Do you know how to supply a password to
lsnrctl set password command in a script? Have attempted with the script but
have not got it
worked yet.

Thanks
Long

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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.com
-- 
Author: Choudhary Rajendra (TTL_LKO)
  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 Script Quest : Urgent

2002-08-10 Thread Brian_P_MacLean




Don't forget the lsof command (list open files).  Just as invaluable as
truss.  Get it at http://www.sunfreeware.com/



   

  chris.w.johnson@b

  t.comTo:   Multiple recipients of list 
ORACLE-L [EMAIL PROTECTED]   
  Sent by: cc: 

  [EMAIL PROTECTED] Subject:  RE: Unix Script Quest : 
Urgent
   

   

  08/09/02 09:08 AM

  Please respond to

  ORACLE-L 

   

   





Hannah,

I'm no Unix guru either but in this situation I use 'truss',  e.g.

truss procname

HTH

Chris
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 09 August 2002 16:08
  To: Multiple recipients of list ORACLE-L
  Subject: Unix Script Quest : Urgent

  Is there a way to capture all files hit by a process/user in unix
  (Sun Solaris 9, ksh)?  I am seeing an OCI file not found on my
  production box.  I can't resovle it.

  So, I want to run the same process on my development box (where it
  works) and get a list of files that it is hitting (I can grep by
  username) for comparison in production.  Only I am definitely NOT the
  Unix guru and as this is for a prod issue, so my time is very
  limited.

  Thanks in advance,

  Hannah




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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 Script Quest : Urgent

2002-08-09 Thread Steven Lembark


 Is there a way to capture all files hit by a process/user in unix (Sun
 Solaris 9, ksh)?  I am seeing an OCI file not found on my production box.
 I can't resovle it.
 So, I want to run the same process on my development box (where it works)
 and get a list of files that it is hitting (I can grep by username) for
 comparison in production.  Only I am definitely NOT the Unix guru and as
 this is for a prod issue, so my time is very limited.
 Thanks in advance,


touch BEFORE;
...
find $wherever -newer ./BEFORE;

will give you a list of files that have changed since the
BEFORE file. If you are sure that the files are being
created (vs. modified or accessed) by one specific userid
then:

find / -newer BEFORE -user id

will work also.

If you are going to run the thing regularly then take a
look at find2p, which will spit out a perl script to
match your find command. The perly code will give you
finer control and better sanity checks (e.g., comparing
to a list in memory of what has already been found to
avoid dup's) than find can.

enjoi.


--
Steven Lembark   2930 W. Palmer
Workhorse Computing   Chicago, IL 60647
+1 800 762 1582
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Steven Lembark
  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 Script Quest : Urgent

2002-08-09 Thread Peter Barnett

ldd filename should give you the dependencies.


--- [EMAIL PROTECTED] wrote:
 Is there a way to capture all files hit by a
 process/user in unix (Sun Solaris 9, ksh)?  I am
 seeing an OCI file not found on my production box. 
 I can't resovle it.
  
 So, I want to run the same process on my development
 box (where it works) and get a list of files that it
 is hitting (I can grep by username) for comparison
 in production.  Only I am definitely NOT the Unix
 guru and as this is for a prod issue, so my time is
 very limited.
  
 Thanks in advance,
  
 Hannah
 


=
Pete Barnett
Lead Database Administrator
The Regence Group
[EMAIL PROTECTED]

__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Peter Barnett
  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 Script Quest : Urgent

2002-08-09 Thread Seefelt, Beth


I think that will give you files that it successfully accessed, but not
the ones that were referenced but not found.

You can do what you're asking on VMS and NT, so it seems like there
should be a way in Unix, although I asked my Unix SA's that same
question a few years back and they said that there isn't.  They were
pretty sharp guys so I tend to believe them.



-Original Message-
Sent: Friday, August 09, 2002 11:33 AM
To: Multiple recipients of list ORACLE-L



 Is there a way to capture all files hit by a process/user in unix (Sun
 Solaris 9, ksh)?  I am seeing an OCI file not found on my production
box.
 I can't resovle it.
 So, I want to run the same process on my development box (where it
works)
 and get a list of files that it is hitting (I can grep by username)
for
 comparison in production.  Only I am definitely NOT the Unix guru and
as
 this is for a prod issue, so my time is very limited.
 Thanks in advance,


touch BEFORE;
...
find $wherever -newer ./BEFORE;

will give you a list of files that have changed since the
BEFORE file. If you are sure that the files are being
created (vs. modified or accessed) by one specific userid
then:

find / -newer BEFORE -user id

will work also.

If you are going to run the thing regularly then take a
look at find2p, which will spit out a perl script to
match your find command. The perly code will give you
finer control and better sanity checks (e.g., comparing
to a list in memory of what has already been found to
avoid dup's) than find can.

enjoi.


--
Steven Lembark   2930 W. Palmer
Workhorse Computing   Chicago, IL 60647
+1 800 762 1582
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Steven Lembark
  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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Seefelt, Beth
  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 Script Quest : Urgent

2002-08-09 Thread johanna . doran

Thanks,

But I don't know the file or pid.  Here's what we are doing:

From an NT box, we are trying to run Sagent software to an Oracle db on unix 
sun solaris (both 64bit).  When we try to refresh, we get a sagent error - OCI file 
not found.

Of course it does not specifiy the file name.

Using the same client, I can connect and run on my development box.

Now, I know the username that Sagent connect to unix as, so I was hoping that 
I could run a trace on the Unix box based on the user name.

But I am not finding a clear way to do this.


I want to run the trace on the develpment box (the one that works), so that I 
can retrieve a list of filenames that the sagent process is hitting.  Then I would 
want to compare the filenames to the directories on the prod bix to see what file is 
missing.

Anyway, I am not seeing a clear way of doing this.

I thinkg I'm going to wind up dumping the directories to file and doing a manual 
compare (ugh!)
.

Thanks,

Hannah
  -Original Message-
 From: [EMAIL PROTECTED]@SUNGARD   On Behalf Of Peter Barnett 
[EMAIL PROTECTED]
 Sent: Friday, August 09, 2002 11:48 AM
 To:   Multiple recipients of list ORACLE-L
 Subject:  Re: Unix Script Quest : Urgent
 
 ldd filename should give you the dependencies.
 
 
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  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 Script Quest : Urgent

2002-08-09 Thread chris . w . johnson



Hannah,

I'm no Unix guru either but in this situation I use 
'truss', e.g.

truss procname

HTH

Chris

  -Original Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]Sent: 09 August 2002 
  16:08To: Multiple recipients of list ORACLE-LSubject: 
  Unix Script Quest : Urgent
  Is there a way to 
  captureall files hit by a process/user in unix (Sun Solaris 9, 
  ksh)? I am seeing an OCI file not found on my production box. I 
  can't resovle it.
  
  So, I want to run 
  the same process on my development box (where it works) and get a list of 
  files that it is hitting (I can grep by username) for comparison in 
  production. Only I am definitely NOT the Unix guru and as this is for a 
  prod issue, so my time is very limited.
  
  Thanks in 
  advance,
  
  Hannah


Re: Unix Script Quest : Urgent

2002-08-09 Thread Charlie Mengler

Never say never.

The output from truss shows all system calls;
which includes file opens.

Here is an interesting exercise for those on *nix boxes.
From one window/session do the following ...
$ sqlplus
From a different window where you are logged onto the system as root 
find the pid (process ID) of the SQLPLUS process from 1st window.
$ truss -p pid | tee /tmp/capture
After the truss command has been initiated go back to the 1st window
and enter a valid Oracle username/password to connect to the DB.
In the window running the truss you'll see all the various login
files which SQL*Plus attempts to open before returning control to
the user  presenting the SQL prompt.

HTH  YMMV


HAND!

Seefelt, Beth wrote:
 
 I think that will give you files that it successfully accessed, but not
 the ones that were referenced but not found.
 
 You can do what you're asking on VMS and NT, so it seems like there
 should be a way in Unix, although I asked my Unix SA's that same
 question a few years back and they said that there isn't.  They were
 pretty sharp guys so I tend to believe them.
 
 -Original Message-
 Sent: Friday, August 09, 2002 11:33 AM
 To: Multiple recipients of list ORACLE-L
 
  Is there a way to capture all files hit by a process/user in unix (Sun
  Solaris 9, ksh)?  I am seeing an OCI file not found on my production
 box.
  I can't resovle it.
  So, I want to run the same process on my development box (where it
 works)
  and get a list of files that it is hitting (I can grep by username)
 for
  comparison in production.  Only I am definitely NOT the Unix guru and
 as
  this is for a prod issue, so my time is very limited.
  Thanks in advance,
 
 touch BEFORE;
 ...
 find $wherever -newer ./BEFORE;
 
 will give you a list of files that have changed since the
 BEFORE file. If you are sure that the files are being
 created (vs. modified or accessed) by one specific userid
 then:
 
 find / -newer BEFORE -user id
 
 will work also.
 
 If you are going to run the thing regularly then take a
 look at find2p, which will spit out a perl script to
 match your find command. The perly code will give you
 finer control and better sanity checks (e.g., comparing
 to a list in memory of what has already been found to
 avoid dup's) than find can.
 
 enjoi.
 
 --
 Steven Lembark   2930 W. Palmer
 Workhorse Computing   Chicago, IL 60647
 +1 800 762 1582
 --
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 --
 Author: Steven Lembark
   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).
 --
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 --
 Author: Seefelt, Beth
   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).

-- 
Charlie Mengler  Maintenance Warehouse  
[EMAIL PROTECTED] 10641 Scripps Summit Ct.
858-831-2229 San Diego, CA 92131
Lack of planning on your part doesn't constitute an emergency on my part!
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Charlie Mengler
  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 Script --- Archive Log Destination Issue

2002-05-14 Thread Brian_P_MacLean


I have found doing a ps command for your job name alone is just asking
for a world of pain, and very very unreliable for reasons that I will not
go into here.  I like to create a lock file as the following ksh example
illustrates:

JOB_LOCK=/tmp/${0##*/}
if [ -f ${JOB_LOCK} ]
then
  cat ${JOB_LOCK} | read v_LOCK_PID
  echo Found job lock pid ${v_LOCK_PID}
  if ps -ef | grep  ${v_LOCK_PID}  | grep -v grep | grep ${0##*/}
/dev/null
  then
echo Job lock pid ${v_LOCK_PID} is running
exit
  fi
  echo Job lock pid ${v_LOCK_PID} not found, removing old job lock
  rm ${JOB_LOCK}
fi
v_LOCK_PID=${$}
echo ${v_LOCK_PID} ${JOB_LOCK}
echo Created job file lock
.
.the rest of your script goes here
.
rm ${JOB_LOCK}


PS: I'm looking for a new TV, think you could get me a deal at BestBuy with
your employee discount?

Brian P. MacLean
Oracle DBA, OCP8i



   
   
  Reddy, Madhusudana 
   
  Madhusudana.Reddy@bTo:   Multiple recipients of 
list ORACLE-L [EMAIL PROTECTED]   
  estbuy.com cc:  
   
  Sent by:Subject:  RE: Unix Script --- 
Archive Log Destination Issue 
  [EMAIL PROTECTED] 
   
   
   
   
   
  05/13/02 10:48 AM
   
  Please respond to
   
  ORACLE-L 
   
   
   
   
   




My mistake , this new script is only working sometimes. Which is scheduled
every hour , but not working at all the hour changes .

-Original Message-
Sent: Monday, May 13, 2002 11:28 AM
To: Multiple recipients of list ORACLE-L


Hello All,
I have a script, which cleans up the archive log destination by moving the
old archive logs to a retention area based on the thresholds
1. Percent of space utilization
2. greater than 2 days old.

The script was working fine , except for the reason , sometimes we see
multiple copies of the same. So I have added the following to code just to
stop multiple copies. But now the script is not running at all and we did
see more than 90% space utilization archive log destination.

Here is the added code:


# Exit If Already Running

function ExitIfAlreadyRunning
{
copies=`ps -ef | grep OraProcessArch | grep $SID_NAME | grep -v grep | wc
-l`
if [ $copies -gt 2 ]
then
   echo $(date) Number Of Copies Running : $copies
   exit 0
else
   return 0
fi
}

Any suggestions ???

I am not  so good in using semaphores and all , looking for a simple
solution if possible ..

Thanks in advance,
Madhu

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Reddy, Madhusudana
  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).

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Reddy, Madhusudana
  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

RE: Unix Script --- Archive Log Destination Issue

2002-05-13 Thread Reddy, Madhusudana

My mistake , this new script is only working sometimes. Which is scheduled
every hour , but not working at all the hour changes .

-Original Message-
Sent: Monday, May 13, 2002 11:28 AM
To: Multiple recipients of list ORACLE-L


Hello All,
I have a script, which cleans up the archive log destination by moving the
old archive logs to a retention area based on the thresholds 
1. Percent of space utilization
2. greater than 2 days old.

The script was working fine , except for the reason , sometimes we see
multiple copies of the same. So I have added the following to code just to
stop multiple copies. But now the script is not running at all and we did
see more than 90% space utilization archive log destination.

Here is the added code:


# Exit If Already Running

function ExitIfAlreadyRunning
{
copies=`ps -ef | grep OraProcessArch | grep $SID_NAME | grep -v grep | wc
-l`
if [ $copies -gt 2 ]
then
   echo $(date) Number Of Copies Running : $copies
   exit 0
else
   return 0
fi
}

Any suggestions ???

I am not  so good in using semaphores and all , looking for a simple
solution if possible ..

Thanks in advance,
Madhu

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Reddy, Madhusudana
  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).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Reddy, Madhusudana
  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 script

2002-04-16 Thread Brian_P_MacLean




Still room for improvement but enough changes to keep you busy for awhile.
Please note that I changed the script to use ksh shell (required by several
of the commands I added) and the exec command that will redirect all
script text output to a common file so that you don't have to redeclare the
output file with each tail and echo command.  Have fun..


#!/bin/ksh
JOB_LOG=/d31/appl/konto/log/laddabilbo.txt
exec 1${JOB_LOG} 21
. /usr/bin/orasetup.sh
. /d31/appl/konto/bat/movefiles.sh
STATUS=0
echo 
###
echo #Starting ${0##*/} at $(date)
echo #
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/ehbgrupp.ctl
log=/d31/appl/konto/log/ehbgrupp.log
STATUS=$((${STATUS} + ${?}))
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/kampanj.ctl
log=/d31/appl/konto/log/kampanj.log
STATUS=$((${STATUS} + ${?}))
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/mxurval.ctl
log=/d31/appl/konto/log/mxurval.log
STATUS=$((${STATUS} + ${?}))
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/load_arg.ctl
log=/d31/appl/konto/log/load_arg.log
STATUS=$((${STATUS} + ${?}))
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/laddabsg.ctl
log=/d31/appl/konto/log/laddabsg.log
STATUS=$((${STATUS} + ${?}))
sqlplus -s konto/icakort  !
  whenever sqlerror exit 1
  set heading off
  set verify off
  set feedback off
  set termout off
  set pages 0
  begin
  konto.fillbilbotables.anrop;
  END;
/
  EXIT
!
STATUS=$((${STATUS} + ${?}))

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

v_error_sum=0
egrep Total logical records skipped|Total logical records rejected|Total
logical records discarded  \
/d31/appl/konto/log/ehbgrupp.log /d31/appl/konto/log/kampanj.log
/d31/appl/konto/log/mxurval.log  \
/d31/appl/konto/log/load_arg.log /d31/appl/konto/log/laddabsg.log
|
  cut -d: -f2 | while read v_error_number
do
  v_error_sum=$((${v_error_sum} + ${v_error_number}))
done
if [ ${v_error_sum} -gt 0 ]
then
  STATUS=$((${STATUS} + 1))
fi

echo #
echo #Job run time was: $((${SECONDS} / 3600)) hours, $(((${SECONDS} %
3600) / 60)) minutes, $((${SECONDS} % 60)) seconds
echo #
echo #Ending ${0##*/} at $(date) with an exit status of ${1}
echo 
###

if [ ${STATUS} -gt 0 ]
then
  cat /d31/appl/konto/log/laddabilbo.txt \
| mailx -s Konto - Statusrapport [EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED]
fi
#
# END-OF-SCRIPT
###





Brian P. MacLean
Oracle DBA, OCP8i



   
 
Roland.Skoldbl 
 
[EMAIL PROTECTED]To: Multiple recipients of list ORACLE-L 
[EMAIL PROTECTED]
Sent by: cc:   
 
[EMAIL PROTECTED]   Subject: Unix script  
 
om 
 
   
 
   
 
04/15/02 11:43 
 
PM 
 
Please respond 
 
to ORACLE-L
 
   

Re: Unix script

2002-04-16 Thread Brian_P_MacLean


Oops.  The line

echo #Ending ${0##*/} at $(date) with an exit status of ${1}

should have been

echo #Ending ${0##*/} at $(date) with an exit status of ${STATUS}





   

Brian P

MacLean  To: [EMAIL PROTECTED]  

 cc: [EMAIL PROTECTED]   

04/16/02 09:06   Subject: Re: Unix script(Document link: 
Brian P MacLean)  
AM 

   

   






Still room for improvement but enough changes to keep you busy for awhile.
Please note that I changed the script to use ksh shell (required by several
of the commands I added) and the exec command that will redirect all
script text output to a common file so that you don't have to redeclare the
output file with each tail and echo command.  Have fun..


#!/bin/ksh
JOB_LOG=/d31/appl/konto/log/laddabilbo.txt
exec 1${JOB_LOG} 21
. /usr/bin/orasetup.sh
. /d31/appl/konto/bat/movefiles.sh
STATUS=0
echo 
###
echo #Starting ${0##*/} at $(date)
echo #
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/ehbgrupp.ctl
log=/d31/appl/konto/log/ehbgrupp.log
STATUS=$((${STATUS} + ${?}))
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/kampanj.ctl
log=/d31/appl/konto/log/kampanj.log
STATUS=$((${STATUS} + ${?}))
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/mxurval.ctl
log=/d31/appl/konto/log/mxurval.log
STATUS=$((${STATUS} + ${?}))
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/load_arg.ctl
log=/d31/appl/konto/log/load_arg.log
STATUS=$((${STATUS} + ${?}))
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/laddabsg.ctl
log=/d31/appl/konto/log/laddabsg.log
STATUS=$((${STATUS} + ${?}))
sqlplus -s konto/icakort  !
  whenever sqlerror exit 1
  set heading off
  set verify off
  set feedback off
  set termout off
  set pages 0
  begin
  konto.fillbilbotables.anrop;
  END;
/
  EXIT
!
STATUS=$((${STATUS} + ${?}))

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

v_error_sum=0
egrep Total logical records skipped|Total logical records rejected|Total
logical records discarded  \
/d31/appl/konto/log/ehbgrupp.log /d31/appl/konto/log/kampanj.log
/d31/appl/konto/log/mxurval.log  \
/d31/appl/konto/log/load_arg.log /d31/appl/konto/log/laddabsg.log
|
  cut -d: -f2 | while read v_error_number
do
  v_error_sum=$((${v_error_sum} + ${v_error_number}))
done
if [ ${v_error_sum} -gt 0 ]
then
  STATUS=$((${STATUS} + 1))
fi

echo #
echo #Job run time was: $((${SECONDS} / 3600)) hours, $(((${SECONDS} %
3600) / 60)) minutes, $((${SECONDS} % 60)) seconds
echo #
echo #Ending ${0##*/} at $(date) with an exit status of ${1}
echo 
###

if [ ${STATUS} -gt 0 ]
then
  cat /d31/appl/konto/log/laddabilbo.txt \
| mailx -s Konto - Statusrapport [EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED]
fi
#
# END-OF-SCRIPT
###





Brian P. MacLean
Oracle DBA, OCP8i



   
 
Roland.Skoldbl 
 
[EMAIL PROTECTED]To: Multiple recipients of list ORACLE-L 
[EMAIL PROTECTED]
Sent

RE: UNIX SCRIPT

2002-02-15 Thread Kevin Lange

Thats a rather open question.

What are you doing your backup to ?  Simply to another disk drive or are you
putting the files out to a tape?
If you are using a tape, are you using some kind of tape management software
or simply copying the files to the tape ?
Are you copying it all to a backup machine or is the backup media on the
same machine ?
What kind of file system do you have ? Something simple or are you using
netapps or some other network file system ?

Please be a bit more specific.

-Original Message-
Sent: Friday, February 15, 2002 11:25 AM
To: Multiple recipients of list ORACLE-L


HI LIST,

I AM LOOKING FOR A SCRIPT TO MAKE A COLD BACKUP FOR ORACLE 8.1.6 ON SunOS
5.7.
I want to schedule this script to shutdown the database at mid night and
make a backup then start it up at 5:00 AM.
Any URL or link or any document it will be very helpful.




Hamid Alavi
Office 818 737-0526
Cell818 402-1987

The information contained in this message and any attachments is intended
only for the use of the individual or entity to which it is addressed, and
may contain information that is PRIVILEGED, CONFIDENTIAL and exempt from
disclosure under applicable law. If you have received this message in error,
you are prohibited from copying, distributing, or using the information.
Please contact the sender immediately by return e-mail and delete the
original message from your system.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hamid Alavi
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Kevin Lange
  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 SCRIPT

2002-02-15 Thread Jared . Still

Please check www.orafaq.com

Also, a google search will yield more scripts than you can use.

Find one that meets your needs, modify if necessary, test it til you
know it works.

Jared





Hamid Alavi [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
02/15/02 09:24 AM
Please respond to ORACLE-L

 
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
cc: 
Subject:UNIX SCRIPT


HI LIST,

I AM LOOKING FOR A SCRIPT TO MAKE A COLD BACKUP FOR ORACLE 8.1.6 ON SunOS
5.7.
I want to schedule this script to shutdown the database at mid night and
make a backup then start it up at 5:00 AM.
Any URL or link or any document it will be very helpful.




Hamid Alavi
Office 818 737-0526
Cell818 402-1987

The information contained in this message and any attachments is intended
only for the use of the individual or entity to which it is addressed, and
may contain information that is PRIVILEGED, CONFIDENTIAL and exempt from
disclosure under applicable law. If you have received this message in 
error,
you are prohibited from copying, distributing, or using the information.
Please contact the sender immediately by return e-mail and delete the
original message from your system.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hamid Alavi
  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).



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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 SCRIPT

2002-02-15 Thread Bellows, Bambi

Here's basically what you need to do:

1)  Write a script which determines which files to backup (hit the DBA and
V$ tables)
2)  Shutdown the database
3)  Once you have those files, use them as a driver in a for|while loop (for
each file, 
A)  Check if it's raw or UFS
if [ raw ] then use dd to backup
else use whatever you want (dd|cpio|tar)
to backup to disk|tape
write in the logfile what time you started this file copy
B)  if success, write to log
else try again and write to log
4)  Startup the database

This can, and should, all be in one script.  You can schedule this script to
kick off at midnight.

You can have another script, which you kick off to start at 5 which
1)  Checks to see whether the first script is running
2)  If it is, kill it and all its subprocesses
3)  Write to the first one's log file that it was killed at 5AM
4)  Start up the database

As for what the commands are to do all this, they are both easy and
time/space consuming to spell out, so I'll leave it to you.  It seems to me
that you are asking for a backup script.  There is a book from Oracle Press
on Oracle backups where you can type it in line by line from the book.

Have fun!
Bambi.
-Original Message-
Sent: Friday, February 15, 2002 11:25 AM
To: Multiple recipients of list ORACLE-L


HI LIST,

I AM LOOKING FOR A SCRIPT TO MAKE A COLD BACKUP FOR ORACLE 8.1.6 ON SunOS
5.7.
I want to schedule this script to shutdown the database at mid night and
make a backup then start it up at 5:00 AM.
Any URL or link or any document it will be very helpful.




Hamid Alavi
Office 818 737-0526
Cell818 402-1987

The information contained in this message and any attachments is intended
only for the use of the individual or entity to which it is addressed, and
may contain information that is PRIVILEGED, CONFIDENTIAL and exempt from
disclosure under applicable law. If you have received this message in error,
you are prohibited from copying, distributing, or using the information.
Please contact the sender immediately by return e-mail and delete the
original message from your system.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hamid Alavi
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Kevin Lange
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Bellows, Bambi
  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 script

2002-01-28 Thread Thomas, Kevin

Do some research man!! This stuff isn't hard to find...sheesh!! 

-Original Message-
Sent: 28 January 2002 14:31
To: Multiple recipients of list ORACLE-L


Hallo,

I have this unix script. I would like to include code which checks if the
oracle database is up and running so the procedure konto.fillbotables.anrop
doesnt start at all.. I also want an errorlog file to be created. Please
tell me how to write the
code and where to include it in this shell script.


#!/bin/sh
. /usr/bin/orasetup.sh
. /d31/appl/konto/bat/movefiles.sh
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/ehbgrupp.ctl
log=/d31/appl/konto/log/ehbgrupp.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



Thanks in advance


Roland


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thomas, Kevin
  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 script

2002-01-28 Thread Hallas John
Title: RE: Unix script





Basis of a script added into yours below. Note I am only checking to see if there is a PMON proces up - maybe best to make a sqlplus connection and read v$instance or something and exit if it fails.

Really very poor but will give you something to work on.


What I don't see from your sample script is the end marker for the  ! command
I normally use  EOF and then at the end of the sql statements I have a line with EOF in. I do not see your ! marker


To get a log file call the shell script and  to log_file or set that up in your cron routine


HTH 


John



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 28 January 2002 14:31
To: Multiple recipients of list ORACLE-L
Subject: Unix script



Hallo,


I have this unix script. I would like to include code which checks if the oracle database is up and running so the procedure konto.fillbotables.anrop doesnt start at all.. I also want an errorlog file to be created. Please tell me how to write the

code and where to include it in this shell script.



#!/bin/sh
. /usr/bin/orasetup.sh
. /d31/appl/konto/bat/movefiles.sh


numberOfLines=`ps -ef|grep pmon wc -l` grep for sid or ora_pmon_sid or whatever
if [ $numberOfLines -lt 2 ] # ie database not running
then 
cat dummy_file |mailx -s No database running loader not started [EMAIL PROTECTED]
else 
fi



sqlldr userid=konto/icakort control=/d31/appl/konto/bat/ehbgrupp.ctl
log=/d31/appl/konto/log/ehbgrupp.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


fi





sqlldr userid=konto/icakort control=/d31/appl/konto/bat/ehbgrupp.ctl
log=/d31/appl/konto/log/ehbgrupp.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




Thanks in advance



Roland



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
 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).




=
This electronic message contains information from the mmO2 plc Group 
which may be privileged or confidential. The information is intended to be 
for the use of the individual(s) or entity named above. If you are not the 
intended recipient be aware that any disclosure, copying, distribution or 
use of the contents of this information is prohibited. If you have received 
this electronic message in error, please notify us by telephone or email 
(to the numbers or address above) immediately.
=




Ang: RE: Unix script

2002-01-27 Thread Roland . Skoldblom


yes, but please help me with that.
Thanks

roland





Boivin, Patrice J [EMAIL PROTECTED]@fatcity.com den 2002-01-27 02:30 PST

Sänd svar till [EMAIL PROTECTED]

Sänt av:  [EMAIL PROTECTED]


Till: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Kopia:

Well, how about just putting a parameter in your procedure.

If the procedure finishes successfully change that parameter's value, and
pass it back to the parent script.

Regards,
Patrice Boivin
Systems Analyst (Oracle Certified DBA)

Systems Admin  Operations | Admin. et Exploit. des systèmes
Technology Services| Services technologiques
Informatics Branch | Direction de l'informatique
Maritimes Region, DFO  | Région des Maritimes, MPO

E-Mail: [EMAIL PROTECTED]


 -Original Message-
Sent:   Sunday, January 27, 2002 5:45 AM
To:Multiple recipients of list ORACLE-L

Hallo,

I have this unix script. I would like to get a errorlog if the pl/sql
procedure konto.fillbotables.anrop doesnt start at all.  Please tell me how
to write the code and where to include it in this shell script.



#!/bin/sh
. /usr/bin/orasetup.sh
. /d31/appl/konto/bat/movefiles.sh
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/ehbgrupp.ctl
log=/d31/appl/konto/log/ehbgrupp.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


Thanks in advance

Roland



--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Boivin, Patrice J
  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).









--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  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 - script

2002-01-11 Thread Sundar




Try out the following.

wget ftp://user:password@host
IP/full path of File/Directory

Example :-

wget ftp://oracle:[EMAIL PROTECTED]//home/superman/myfile.txt

Get back in
case of any clarification.

Bye
Sundar






Thomas, Kevin wrote:

  Roland,Try this by setting up environment variables at the top of your script:SERVER1= 10.10.10.10USER1= 'xxx'PWD1= 'xxx'SERVER2= 10.10.10.20USER1= 'yyy'PWD2= ''Then have this:ftp -i -n  EOFopen $SERVER1user $USER1  $PWD1cd scriptsget filecloseEOFYou can then have a section like the one below if you want to copy to adifferent serverother than the one you are running this script from:ftp -i -n  EOFopen $SERVER2user $USER2  $PWD2cd scriptsput filecloseEOFBoth of these can be included in the one shell script.Hope that helps.Kev.'In Windows no one can hear you scream'__Kevin ThomasTechnical AnalystDeregulation ServicesCalanais Ltd.(2nd Floor East - Weirs Building)Tel: 0141 568 2377Fax: 0141 568 2366http://www.calanais.com-Original Message-Sent: 09 January 2002 07:16To: Multiple recipients of list ORACLE-LHallo,I would like to have an example of a unix script, which does the following:copy some files from directory /prod/sas/data  located at "hardy".(which isa computer)to the other database hakon. Is it possible to do this. Please help mequick.Thanks in advanceRoland S
  
  
  
  


RE: Unix - script

2002-01-11 Thread Veronica Levin

Is there any similar command in AIX?
Can't find wget.

Saludos,
Veronica Levin Enriquez
Compañía Cervecera de Nicaragua
 

-Mensaje original-
De: Gogala, Mladen [mailto:[EMAIL PROTECTED]]
Enviado el: Miércoles, 09 de Enero de 2002 09:12 a.m.
Para: Multiple recipients of list ORACLE-L
Asunto: RE: Unix - script


I would suggest using wget, which is built exactly for this purpose.

-Original Message-
Sent: Wednesday, January 09, 2002 3:20 AM
To: Multiple recipients of list ORACLE-L


Roland,

Try this by setting up environment variables at the top of your script:

SERVER1= 10.10.10.10
USER1= 'xxx'
PWD1= 'xxx'
SERVER2= 10.10.10.20
USER1= 'yyy'
PWD2= ''

Then have this:

ftp -i -n  EOF
open $SERVER1
user $USER1  $PWD1
cd scripts
get file
close
EOF

You can then have a section like the one below if you want to copy to a
different server
other than the one you are running this script from:

ftp -i -n  EOF
open $SERVER2
user $USER2  $PWD2
cd scripts
put file
close
EOF

Both of these can be included in the one shell script.

Hope that helps.
Kev.


'In Windows no one can hear you scream'
__

Kevin Thomas
Technical Analyst
Deregulation Services
Calanais Ltd.
(2nd Floor East - Weirs Building)
Tel: 0141 568 2377
Fax: 0141 568 2366
http://www.calanais.com





-Original Message-
Sent: 09 January 2002 07:16
To: Multiple recipients of list ORACLE-L


Hallo,

I would like to have an example of a unix script, which does the following:

copy some files from directory /prod/sas/data  located at hardy.(which is
a computer)
to the other database hakon. Is it possible to do this. Please help me
quick.


Thanks in advance

Roland S

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thomas, Kevin
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gogala, Mladen
  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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Veronica Levin
  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 - script

2002-01-11 Thread Jared . Still


try www.wget.org




   
 
Veronica Levin 
 
vlevin@victor   To: Multiple recipients of list ORACLE-L 
[EMAIL PROTECTED]
ia.com.ni   cc:   
 
Sent by: Subject: RE: Unix - script
 
[EMAIL PROTECTED] 
 
om 
 
   
 
   
 
01/11/02 12:55 
 
PM 
 
Please respond 
 
to ORACLE-L
 
   
 
   
 




Is there any similar command in AIX?
Can't find wget.

Saludos,
Veronica Levin Enriquez
Compañía Cervecera de Nicaragua


-Mensaje original-
De: Gogala, Mladen [mailto:[EMAIL PROTECTED]]
Enviado el: Miércoles, 09 de Enero de 2002 09:12 a.m.
Para: Multiple recipients of list ORACLE-L
Asunto: RE: Unix - script


I would suggest using wget, which is built exactly for this purpose.

-Original Message-
Sent: Wednesday, January 09, 2002 3:20 AM
To: Multiple recipients of list ORACLE-L


Roland,

Try this by setting up environment variables at the top of your script:

SERVER1= 10.10.10.10
USER1= 'xxx'
PWD1= 'xxx'
SERVER2= 10.10.10.20
USER1= 'yyy'
PWD2= ''

Then have this:

ftp -i -n  EOF
open $SERVER1
user $USER1  $PWD1
cd scripts
get file
close
EOF

You can then have a section like the one below if you want to copy to a
different server
other than the one you are running this script from:

ftp -i -n  EOF
open $SERVER2
user $USER2  $PWD2
cd scripts
put file
close
EOF

Both of these can be included in the one shell script.

Hope that helps.
Kev.


'In Windows no one can hear you scream'
__

Kevin Thomas
Technical Analyst
Deregulation Services
Calanais Ltd.
(2nd Floor East - Weirs Building)
Tel: 0141 568 2377
Fax: 0141 568 2366
http://www.calanais.com





-Original Message-
Sent: 09 January 2002 07:16
To: Multiple recipients of list ORACLE-L


Hallo,

I would like to have an example of a unix script, which does the following:

copy some files from directory /prod/sas/data  located at hardy.(which is
a computer)
to the other database hakon. Is it possible to do this. Please help me
quick.


Thanks in advance

Roland S

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Thomas, Kevin
  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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Gogala, Mladen
  INET: [EMAIL PROTECTED]

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

Ang: RE: Unix - script

2002-01-10 Thread Roland . Skoldblom


So I have to use the ip-addresses? I cant use  the name of the computer, for instance 
hakon5.

Thanks in advance

Roland






Gogala, Mladen [EMAIL PROTECTED]@fatcity.com den 2002-01-09 07:11 PST

Sänd svar till [EMAIL PROTECTED]

Sänt av:  [EMAIL PROTECTED]


Till: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Kopia:

I would suggest using wget, which is built exactly for this purpose.

-Original Message-
Sent: Wednesday, January 09, 2002 3:20 AM
To: Multiple recipients of list ORACLE-L


Roland,

Try this by setting up environment variables at the top of your script:

SERVER1= 10.10.10.10
USER1= 'xxx'
PWD1= 'xxx'
SERVER2= 10.10.10.20
USER1= 'yyy'
PWD2= ''

Then have this:

ftp -i -n  EOF
open $SERVER1
user $USER1  $PWD1
cd scripts
get file
close
EOF

You can then have a section like the one below if you want to copy to a
different server
other than the one you are running this script from:

ftp -i -n  EOF
open $SERVER2
user $USER2  $PWD2
cd scripts
put file
close
EOF

Both of these can be included in the one shell script.

Hope that helps.
Kev.


'In Windows no one can hear you scream'
__

Kevin Thomas
Technical Analyst
Deregulation Services
Calanais Ltd.
(2nd Floor East - Weirs Building)
Tel: 0141 568 2377
Fax: 0141 568 2366
http://www.calanais.com





-Original Message-
Sent: 09 January 2002 07:16
To: Multiple recipients of list ORACLE-L


Hallo,

I would like to have an example of a unix script, which does the following:

copy some files from directory /prod/sas/data  located at hardy.(which is
a computer)
to the other database hakon. Is it possible to do this. Please help me
quick.


Thanks in advance

Roland S

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Thomas, Kevin
  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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Gogala, Mladen
  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).









--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  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 - script

2002-01-09 Thread C.S.Venkata Subramanian

Use unix utility ftp to copy file between 2 mc's or use rcopy. For more details refer 
to man pages. 
--

On Tue, 08 Jan 2002 23:15:35  
 Roland.Skoldblom wrote:
Hallo,

I would like to have an example of a unix script, which does the following:

copy some files from directory /prod/sas/data  located at hardy.(which is a 
computer)
to the other database hakon. Is it possible to do this. Please help me quick.


Thanks in advance

Roland S

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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).



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: C.S.Venkata Subramanian
  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 - script

2002-01-09 Thread Thomas, Kevin

Roland,

Try this by setting up environment variables at the top of your script:

SERVER1= 10.10.10.10
USER1= 'xxx'
PWD1= 'xxx'
SERVER2= 10.10.10.20
USER1= 'yyy'
PWD2= ''

Then have this:

ftp -i -n  EOF
open $SERVER1
user $USER1  $PWD1
cd scripts
get file
close
EOF

You can then have a section like the one below if you want to copy to a
different server
other than the one you are running this script from:

ftp -i -n  EOF
open $SERVER2
user $USER2  $PWD2
cd scripts
put file
close
EOF

Both of these can be included in the one shell script.

Hope that helps.
Kev.


'In Windows no one can hear you scream'
__

Kevin Thomas
Technical Analyst
Deregulation Services
Calanais Ltd.
(2nd Floor East - Weirs Building)
Tel: 0141 568 2377
Fax: 0141 568 2366
http://www.calanais.com





-Original Message-
Sent: 09 January 2002 07:16
To: Multiple recipients of list ORACLE-L


Hallo,

I would like to have an example of a unix script, which does the following:

copy some files from directory /prod/sas/data  located at hardy.(which is
a computer)
to the other database hakon. Is it possible to do this. Please help me
quick.


Thanks in advance

Roland S

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thomas, Kevin
  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 - script

2002-01-09 Thread Thomas, Kevin

Forgot to mention, the 'cd scripts' line in both examples is not required,
it's just been left in from the script I copied. oops!
K.

-Original Message-
Sent: 09 January 2002 08:20
To: Multiple recipients of list ORACLE-L


Roland,

Try this by setting up environment variables at the top of your script:

SERVER1= 10.10.10.10
USER1= 'xxx'
PWD1= 'xxx'
SERVER2= 10.10.10.20
USER1= 'yyy'
PWD2= ''

Then have this:

ftp -i -n  EOF
open $SERVER1
user $USER1  $PWD1
cd scripts
get file
close
EOF

You can then have a section like the one below if you want to copy to a
different server
other than the one you are running this script from:

ftp -i -n  EOF
open $SERVER2
user $USER2  $PWD2
cd scripts
put file
close
EOF

Both of these can be included in the one shell script.

Hope that helps.
Kev.


'In Windows no one can hear you scream'
__

Kevin Thomas
Technical Analyst
Deregulation Services
Calanais Ltd.
(2nd Floor East - Weirs Building)
Tel: 0141 568 2377
Fax: 0141 568 2366
http://www.calanais.com





-Original Message-
Sent: 09 January 2002 07:16
To: Multiple recipients of list ORACLE-L


Hallo,

I would like to have an example of a unix script, which does the following:

copy some files from directory /prod/sas/data  located at hardy.(which is
a computer)
to the other database hakon. Is it possible to do this. Please help me
quick.


Thanks in advance

Roland S

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thomas, Kevin
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thomas, Kevin
  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 - script

2002-01-09 Thread Mike Killough

It could be faster to remote copy:

rcp -p /archive/orcl/arch_1_2290.arc 
oracle@server2:/archive/orcl/arch_1_2290.arc

Mike

From: Thomas, Kevin [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Subject: RE: Unix - script
Date: Wed, 09 Jan 2002 00:35:23 -0800

Forgot to mention, the 'cd scripts' line in both examples is not required,
it's just been left in from the script I copied. oops!
K.

-Original Message-
Sent: 09 January 2002 08:20
To: Multiple recipients of list ORACLE-L


Roland,

Try this by setting up environment variables at the top of your script:

SERVER1= 10.10.10.10
USER1= 'xxx'
PWD1= 'xxx'
SERVER2= 10.10.10.20
USER1= 'yyy'
PWD2= ''

Then have this:

ftp -i -n  EOF
open $SERVER1
user $USER1  $PWD1
cd scripts
get file
close
EOF

You can then have a section like the one below if you want to copy to a
different server
other than the one you are running this script from:

ftp -i -n  EOF
open $SERVER2
user $USER2  $PWD2
cd scripts
put file
close
EOF

Both of these can be included in the one shell script.

Hope that helps.
Kev.


'In Windows no one can hear you scream'
__

Kevin Thomas
Technical Analyst
Deregulation Services
Calanais Ltd.
(2nd Floor East - Weirs Building)
Tel: 0141 568 2377
Fax: 0141 568 2366
http://www.calanais.com





-Original Message-
Sent: 09 January 2002 07:16
To: Multiple recipients of list ORACLE-L


Hallo,

I would like to have an example of a unix script, which does the following:

copy some files from directory /prod/sas/data  located at hardy.(which is
a computer)
to the other database hakon. Is it possible to do this. Please help me
quick.


Thanks in advance

Roland S

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
   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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Thomas, Kevin
   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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Thomas, Kevin
   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).


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mike Killough
  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 - script

2002-01-09 Thread Thomas, Kevin

Yip, never thought of that one ;o)

-Original Message-
Sent: 09 January 2002 10:55
To: Multiple recipients of list ORACLE-L


It could be faster to remote copy:

rcp -p /archive/orcl/arch_1_2290.arc 
oracle@server2:/archive/orcl/arch_1_2290.arc

Mike

From: Thomas, Kevin [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Subject: RE: Unix - script
Date: Wed, 09 Jan 2002 00:35:23 -0800

Forgot to mention, the 'cd scripts' line in both examples is not required,
it's just been left in from the script I copied. oops!
K.

-Original Message-
Sent: 09 January 2002 08:20
To: Multiple recipients of list ORACLE-L


Roland,

Try this by setting up environment variables at the top of your script:

SERVER1= 10.10.10.10
USER1= 'xxx'
PWD1= 'xxx'
SERVER2= 10.10.10.20
USER1= 'yyy'
PWD2= ''

Then have this:

ftp -i -n  EOF
open $SERVER1
user $USER1  $PWD1
cd scripts
get file
close
EOF

You can then have a section like the one below if you want to copy to a
different server
other than the one you are running this script from:

ftp -i -n  EOF
open $SERVER2
user $USER2  $PWD2
cd scripts
put file
close
EOF

Both of these can be included in the one shell script.

Hope that helps.
Kev.


'In Windows no one can hear you scream'
__

Kevin Thomas
Technical Analyst
Deregulation Services
Calanais Ltd.
(2nd Floor East - Weirs Building)
Tel: 0141 568 2377
Fax: 0141 568 2366
http://www.calanais.com





-Original Message-
Sent: 09 January 2002 07:16
To: Multiple recipients of list ORACLE-L


Hallo,

I would like to have an example of a unix script, which does the following:

copy some files from directory /prod/sas/data  located at hardy.(which is
a computer)
to the other database hakon. Is it possible to do this. Please help me
quick.


Thanks in advance

Roland S

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
   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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Thomas, Kevin
   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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Thomas, Kevin
   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).


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mike Killough
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thomas, Kevin
  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

RE: Unix - script

2002-01-09 Thread Scott . Shafer

on hakon:

scp user@hardy:/prod/sas/data/file /dir/on/hardy/

is one way if you have ssh/scp installed.

Scott Shafer
San Antonio, TX
210-581-6217

Common sense will not accomplish great things. Simply become insane and
desperate.

 -Original Message-
 From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, January 09, 2002 1:16 AM
 To:   Multiple recipients of list ORACLE-L
 Subject:  Unix - script
 
 Hallo,
 
 I would like to have an example of a unix script, which does the
 following:
 
 copy some files from directory /prod/sas/data  located at hardy.(which
 is a computer)
 to the other database hakon. Is it possible to do this. Please help me
 quick.
 
 
 Thanks in advance
 
 Roland S
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: 
   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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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-script

2001-08-30 Thread Rachel Carmichael

Ron,

try


man cron  or man crontab


write your shell script as if you were going to run it from the command line 
manually (however, make sure you define all the environment variables you 
will need within the script)

Once it is done and working, use cron to schedule it for Unix.

Rachel


From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Subject: Unix-script
Date: Thu, 30 Aug 2001 07:16:24 -0800

Hallo

Can anyone give me an example on how to write a unix script
which schedules the run run of  a sqlloader script from unix server into 
the database.
I mean I could easily get the file tmanually o be imported if i use the ftp 
command, but how do i do
if I want  that to be  scheduled?

Roland S




--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
   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).


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rachel Carmichael
  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-script

2001-08-30 Thread Jenkins, Michael

Just an example:

#!/bin/ksh

. $HOME/.profile

{Insert additional environment variables here}

ftp -vin {Box Name or IP Address}EOF
user {FTP Account Name} {FTP Password}
asc
get {Source Filename} {Destination Filename}
bye
EOF

sqlload {Schema}/{Password} control={Name Of Control File}

Schedule the whole thing in cron.

--Michael

-Original Message-
Sent: Thursday, August 30, 2001 1:27 PM
To: Multiple recipients of list ORACLE-L


Ron,

try


man cron  or man crontab


write your shell script as if you were going to run it from the command line

manually (however, make sure you define all the environment variables you 
will need within the script)

Once it is done and working, use cron to schedule it for Unix.

Rachel


From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Subject: Unix-script
Date: Thu, 30 Aug 2001 07:16:24 -0800

Hallo

Can anyone give me an example on how to write a unix script
which schedules the run run of  a sqlloader script from unix server into 
the database.
I mean I could easily get the file tmanually o be imported if i use the ftp

command, but how do i do
if I want  that to be  scheduled?

Roland S




--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
   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).


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rachel Carmichael
  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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jenkins, Michael
  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-script

2001-08-29 Thread Stephane Faroult

[EMAIL PROTECTED] wrote:
 
 Hallo,
 
 Can anyone give me an eaxmple of a iunix script, which checks if the file in 
unixsystem exists
 and if it does then it runs th esqlloader script, which loads data into a database 
table.?
 Thanks in advance.
 
 Roland
 

There is a script named upload.ksh on the Oriole site which does more
than this (it has been written to run a number of loads in parallel, and
to work with a matching download.ksh). You may find it a bit hard to
swallow if you are still struggling with script programming, but it
contains bits which will certainly be of interest to you, such as
extensive error checking, rebuilding of invalidated indexes if a direct
load fails and automated restart of the load in conventional mode, etc.
--
Regards,

  Stephane Faroult
  Oriole Corporation
--
http://www.oriolecorp.com, designed by Oracle DBAs for Oracle DBAs
--
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  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 SCRIPT ISSUE - URGENT

2001-07-25 Thread Larry Strickland

Since you have so many files, you are likely to hit problems with the line length of 
the various shells.  Assuming that all of the files are in the directory 
/usr/myfiles and that the script mentioned below is named cvtip, is executable and 
is in /usr/local/bin (or some other directory in the path), you could do the following:

$ cd /usr/myfiles
$ find . -type f -print | xargs cvtip

and that would do exactly what you want IF you modify the scipt as follows (this 
processes multiple files at the same invocation of the script):

#!/usr/bin/ksh
for FN
do
IP=`echo $FN|cut -c1-16`
mv $FN ${FN}.old
sed s/Report by Hosts/$IP| Report by Hosts/ ${FN}.old $FN
done

This modification processes multiple filenames on the command line.  It also assumes 
that the file exists in the current directory (which I don't like, but which I don't 
want to work around right now).  It first renames the file by tacking .old on the 
filename, then converts it as the previous script did and sends the output to the 
original filename (i.e., without the .old on the end)

Hope this helps,
larry


On Wed, 25 Jul 2001 06:26:12 -0800
Johan Muller [EMAIL PROTECTED] wrote:

 I need to extract the first 16 bytes of a filename (AIX 4.3) which consists of
 an IP address (nnn.nnn.nnn.nnn), and move that to first 16 positions in the
 file itself, plus adding a pipe (|) sign for a delimiter, and save the IP
 address as a file name with a .dat extension, before loading the contents into
 a table.
 
 My predecessor concocted the following:
 
 #!/usr/bin/ksh
  FN=$1
  IP=`echo $FN|cut -c1-16`
  sed s/Report by Hosts/$IP| Report by Hosts/ $FN  newfile.dat
  #-- End of file
 
 which is great for a single file at a time.
 
 Right now I have to perform this surgery on 19 986 files, which is in one
 place.
 Using the script above would take me over 20 000 hours.
 
 Any way I can grab the files one at the time based on a ls command, and invoke
 the script, and to end up when the last file has been processed.
 
 ALTERNATIVE:
 
 Each file contains the IP address which has to move into the first position
 after a string on line 13 which you guessed it: is called 'IP Address:'. Is
 their a way vi could be used to achieve the same result?
 
 Any input would be appreciated,
 
 
 Johan Muller
 
 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute with Yahoo! Messenger
 http://phonecard.yahoo.com/
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Johan Muller
   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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Larry Strickland
  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 SCRIPT ISSUE - URGENT

2001-07-25 Thread Hallas John
Title: RE: UNIX SCRIPT ISSUE - URGENT 





No unix expert but the first option can be achieved automatically
by running the following script


for filename in `ls *.file` 
do
unix script as listed
done


Rename a couple of the files and try out the syntax and work out the timings.
Once it all works properly then rename some of the files (extensions at least) and set the scripyt off a numver of times in the background (nohup scriptname ) and the work can be spread around between processors on the system


For the 2nd option I would have thought AWK was the required utility but can offer nothing more substantial than that at the moment


John


-Original Message-
From: Johan Muller [mailto:[EMAIL PROTECTED]]
Sent: 25 July 01 15:26
To: Multiple recipients of list ORACLE-L
Subject: UNIX SCRIPT ISSUE - URGENT 



I need to extract the first 16 bytes of a filename (AIX 4.3) which consists of
an IP address (nnn.nnn.nnn.nnn), and move that to first 16 positions in the
file itself, plus adding a pipe (|) sign for a delimiter, and save the IP
address as a file name with a .dat extension, before loading the contents into
a table.


My predecessor concocted the following:


#!/usr/bin/ksh
FN=$1
IP=`echo $FN|cut -c1-16`
sed s/Report by Hosts/$IP| Report by Hosts/ $FN  newfile.dat
#-- End of file


which is great for a single file at a time.


Right now I have to perform this surgery on 19 986 files, which is in one
place.
Using the script above would take me over 20 000 hours.


Any way I can grab the files one at the time based on a ls command, and invoke
the script, and to end up when the last file has been processed.


ALTERNATIVE:


Each file contains the IP address which has to move into the first position
after a string on line 13 which you guessed it: is called 'IP Address:'. Is
their a way vi could be used to achieve the same result?


Any input would be appreciated,



Johan Muller


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Johan Muller
 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).





**
This email and any attachments may be confidential and the subject of 
legal professional privilege.  Any disclosure, use, storage or copying 
of this email without the consent of the sender is strictly prohibited.
Please notify the sender immediately if you are not the intended 
recipient and then delete the email from your inbox and do not 
disclose the contents to another person, use, copy or store the 
information in any medium. 
**



RE: UNIX SCRIPT ISSUE - URGENT

2001-07-25 Thread Anderson, Brian

for i in `ls`
do
YourScript.shl $i
done

Unless you are also processing your newfile.dat in the script you need
to make unique names for the output files.
Something like:
sed s/Report by Hosts/$IP| Report by Hosts/ $FN  new_${FN}.dat
so you will get an output file from each input file.


 -Original Message-
 From: Johan Muller [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 25, 2001 10:26 AM
 To: Multiple recipients of list ORACLE-L
 Subject: UNIX SCRIPT ISSUE - URGENT 
 
 
 I need to extract the first 16 bytes of a filename (AIX 4.3) 
 which consists of
 an IP address (nnn.nnn.nnn.nnn), and move that to first 16 
 positions in the
 file itself, plus adding a pipe (|) sign for a delimiter, and 
 save the IP
 address as a file name with a .dat extension, before loading 
 the contents into
 a table.
 
 My predecessor concocted the following:
 
 #!/usr/bin/ksh
  FN=$1
  IP=`echo $FN|cut -c1-16`
  sed s/Report by Hosts/$IP| Report by Hosts/ $FN  newfile.dat
  #-- End of file
 
 which is great for a single file at a time.
 
 Right now I have to perform this surgery on 19 986 files, 
 which is in one
 place.
 Using the script above would take me over 20 000 hours.
 
 Any way I can grab the files one at the time based on a ls 
 command, and invoke
 the script, and to end up when the last file has been processed.
 
 ALTERNATIVE:
 
 Each file contains the IP address which has to move into the 
 first position
 after a string on line 13 which you guessed it: is called 'IP 
 Address:'. Is
 their a way vi could be used to achieve the same result?
 
 Any input would be appreciated,
 
 
 Johan Muller
 
 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute with 
 Yahoo! Messenger
 http://phonecard.yahoo.com/
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Johan Muller
   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).
 
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Anderson, Brian
  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 SCRIPT ISSUE - URGENT

2001-07-25 Thread Mustafa

Try awk or perl.  They can handle string manipulation from OS commands
simply and quickly.  A simple awk script to take the first 16 characters of
the output of ls and put it into a data file follows:

gawk 'BEGIN { while (ls | getline) print substr($1,1,16) | Report by
Hosts}'  new.dat

Defry

- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Wednesday, July 25, 2001 10:26 AM


 I need to extract the first 16 bytes of a filename (AIX 4.3) which
consists of
 an IP address (nnn.nnn.nnn.nnn), and move that to first 16 positions in
the
 file itself, plus adding a pipe (|) sign for a delimiter, and save the IP
 address as a file name with a .dat extension, before loading the contents
into
 a table.

 My predecessor concocted the following:

 #!/usr/bin/ksh
  FN=$1
  IP=`echo $FN|cut -c1-16`
  sed s/Report by Hosts/$IP| Report by Hosts/ $FN  newfile.dat
  #-- End of file

 which is great for a single file at a time.

 Right now I have to perform this surgery on 19 986 files, which is in one
 place.
 Using the script above would take me over 20 000 hours.

 Any way I can grab the files one at the time based on a ls command, and
invoke
 the script, and to end up when the last file has been processed.

 ALTERNATIVE:

 Each file contains the IP address which has to move into the first
position
 after a string on line 13 which you guessed it: is called 'IP Address:'.
Is
 their a way vi could be used to achieve the same result?

 Any input would be appreciated,


 Johan Muller

 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute with Yahoo! Messenger
 http://phonecard.yahoo.com/
 --
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 --
 Author: Johan Muller
   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).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mustafa
  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 script question

2001-02-01 Thread Glenn Travis

check the man page;
$ man test

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Roy
 Ferguson
 Sent: Wednesday, January 31, 2001 2:48 PM
 To: Multiple recipients of list ORACLE-L
 Subject: Unix script question


 I am looking to resolve an issue we have with a particular script.

 using a unix script, I need to determine if a file exists and if
 the size of the
 file is zero bytes.  using ftp, we put a file a file on a server
 then we use get
 to retreive the same file back. we do this to ensure that the
 file has been sent
 successfully.  once the file is gotten back, using get, we
 compare the original
 file to the get file.  we then use if to see if the file was
 successfully send
 and received back.  if the file is not gotten back, we email the
 necessary
 people of the error.  if the files are different sizes, we email
 the necessary
 people that the file sizes do not match and that the ftp process
 needs to be
 done again.  all of the above steps work fine.

 the issue we face is when we ftp a zero byte file and receive the
 same file back
 the if statement we're using sees the zero byte file as none existant and
 therefore an email is sent saying that the ftp process failed
 when in fact it
 didn't.  it just sent and received a zero byte file.  a zero byte
 file is not a
 failed process.

 finally...the question...

 can a unix scripting guru assist me in the code that checks if a
 file is a zero
 byte file?

 thanks in advance...Roy

 below is the current portion of the script that checks for errors:


 put  file1 'file1'
 get  'file1' check_file
 bye
 !EOF


 # First if statement will check to see if the check file exists

 if test ! -s "check_file"
then

 # if the file does not exist, send the failed message and exit the program

   echo Failed to pull a check file back from the FTP
   echodo /usr/ucb/mail -s ftp_of_file1.FAILED `cat $EMAIL/fail.list` 
 $EMAIL/fail.msg

 --
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 --
 Author: Roy Ferguson
   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).


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Glenn Travis
  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).