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
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
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
]
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
, 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
[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
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
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
-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
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
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
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
#!/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
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] =~
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
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
-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
:)
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;
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
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.
-
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
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
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
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
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
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
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,
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
by: cc:
[EMAIL PROTECTED] Subject: RE: 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
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
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
: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
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
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
To: Multiple recipients of
list ORACLE-L [EMAIL PROTECTED]
estbuy.com cc:
Sent by:Subject: RE: Unix Script
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
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
]
04/16/02 09:06 Subject: Re: Unix script(Document link:
Brian P MacLean)
AM
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
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
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
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
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
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
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
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
To: Multiple recipients of list ORACLE-L
[EMAIL PROTECTED]
ia.com.ni cc:
Sent by: Subject: RE: Unix - script
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
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
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
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
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
]
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
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
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
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}
[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
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
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
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.
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
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
63 matches
Mail list logo