Hi all,
Need some advise please on how do date arithmetic/calculation.
Basically, I have a CSV delimited file that I need to do some date
calculations on.
Am parsing the fields as $date1 and $date2 and I need to do the time
difference as $date2-$date1
Example of $date1 and $date2 below:
$date1
Hi all,
To anyone who had been using Perl DBI and Oracle, can you please confirm if
connection by SYSDBA works or doesn't?
I currently have the following DBI / DBD installed on this problem:
DBI Version : 1.43
DBD Version : 1.15
Unfortunately, am not the SA so can't just install the latest modu
Hi all,
Can anyone please advise how I can change the following codes to work where
the and are not exposed?
Script is ran via crontab and can also be run manually, at the moment am
reading these values from some sort of delimited file.
The worry is someone getting access to the script and then
Hi all,
Just want to know if there is an alternative to these error "trapping" that
am using for the following code:
#!/usr/bin/perl
use DBI;
$dbh = DBI->connect('dbi:Oracle:host=localhost;sid=test1;port=1521',
'test1_user', 'test1_password');
if ( defined($dbh) ) {# Checking for a succ
Hi all,
We are in the process of changing UNIX and MS-DOS scripts into Perl, mostly
UNIX scripts and there are a lot of codes that uses the < Today is ==> ' || sysdate from dual
;
set heading on
prompt
prompt - MAX DATETIME
prompt
select max(datetime), max(ackdatetime), max(tim
u, Feb 11, 2010 at 2:11 PM, Jim Gibson wrote:
> On 2/10/10 Wed Feb 10, 2010 3:07 PM, "newbie01 perl"
> scribbled:
>
> > Hi all,
> >
> > We are in the process of changing UNIX and MS-DOS scripts into Perl,
> mostly
> > UNIX scripts and there are a l
Hi all,
I am wanting some advise/input on setting up some sort of intranet site to
allow system operators to manage the servers, mostly UNIX servers and some
Windows. I am constrained by not being able to install new modules or a
database, for example, MySQL. The web server will be Apache. Given t
the owner of the script ...
On Thu, Feb 11, 2010 at 10:37 PM, Philip Potter
wrote:
> On 10 February 2010 23:04, newbie01 perl wrote:
> >
> > Hi all,
> >
> > Can anyone please advise how I can change the following codes to work
> where
> > the and are not expos
Hi all,
Am trying to write a script that will simply list all Windows Services and
its Status, i.e Started or Not Started and the percent used and percent
available space of logical volumes on Windows, is there anyone on this group
that may already have a script similar to this that he/she is will
Hi,
At the moment, I have some sort of INI/config file that I edit manually via
vi. These config files are "simple" delimited file that are used by some of
the scripts running on the server.
I want to be able to the same thing via cgi-bin, can anyone advise where to
start. Basically, I want to be
Hi all,
We currently have OEM installed but will have to uninstall it due to
Oracle Licensing issues. Customers do not want to pay
for the performance and diagnostic pack and are actually considering
to move to SQLServer .. :-)
Anyway, am wanting to try out and install oracletool or orcaware. Bot
Hi all,
I have a Perl script that uses Date::Calc to calculate difference between
two datetime variables using Decode_Month and Delta_YMDHMS.
( $yy, $mm, $dd, $hh, $mi, $ss ) = Delta_YMDHMS( $logical_yy, $logical_mm,
$logical_dd,
$logical_hh,
$
age, it is very generic, that it cannot find the DBI
module. The script is very simple as below:
#!/
use DBI;
On Wed, Apr 7, 2010 at 12:16 AM, Rob Coops wrote:
>
>
> On Tue, Apr 6, 2010 at 2:06 PM, Shlomi Fish wrote:
>
>> Hi Chen,
>>
>> "newbie01 perl"
15:17:15 newbie01 perl wrote:
> > Hi Rob and all,
> >
> > Thanks for all your response. They are all very helpful. Unfortunately,
> am
> > not in the office at the moment.
> >
> > I agree with your suggestion about hacking one of the OEM Perl script but
> &
Hi all,
I have a Perl script on Windows that does date calculation and using
Date::Calc, Decode_Month and Delta_YMDHMS functions
Am using the script to calculate the difference between two dates, for
example, for the two (2) dates below:
01/Jan/2010 04:01:27
01/Jan/2010 02:06:30
The script is wo
Hi all,
Running perl -V gives output below which is the path to the modules that the
default perl have access to. Is there any way to display the installed
modules that are available to use so that at least it will not be too late
to find out? The main objective is being able to know what modules
Hi all,
I need to convert a lot of UNIX scripts into Perl. Most of them uses the
UNIX's EOF/EOL functionality. These scripts are mostly used to connect to
Oracle databases. At the moment, installing a DBI is not an option. The
scripts will be running locally on the servers so technically it should
Hi all,
Am wanting to change my Perl scripts to get it to run on several UNIX
flavours and Windows. At the moment, the only way I can think of how to
accomplish that is always having the following checks on each and every sub
that I have.
Can anyone please suggest if there is a better way of doin
HI all,
Does anyone know of any XML to text Perl script around that I can use?
Basically, I have an XML file that is supposed to composed of fields and
unfortunately on the server, I do not have a browser to view it properly, at
the moment, am downloading the file and then viewing it from my brow
Hi all,
If I declare a variable x1 outside of the sub that makes it global, right?
Now the question is can I have the same variable x1 as a local variable of a
sub, i.e. will the following work?
$x1 = "cat";
sub sample()
{
my $x1="dog";
...
...
}
Just trying to work out some guidelines
Thanks to everyone who had responded to this post ...
On Tue, Apr 20, 2010 at 1:56 AM, David Nicol wrote:
> Someone calling themselves newbie01.perl is really kind of dubious,
> couldn't you have made up a more fun nomme de guerre, like "Olyve
> Crudite"? I'm going
Hi,
Does anyone have a UNIX permission bit calculator script that I can use?
Basically, am looking for one where I don't have to a ls -l to check the
permission on a file or directory. Am looking for a script that will display
the permission bits and then just display what those permission bit set
Hi all,
Instead of re-inventing the wheel, I would like to possibly use existing
Perl scripts that may already be available out there.
Scripts that am looking for are mainly maintenance scripts, i.e. remove old
files, rotate log files, remove old directory ( mainly core dumps directory
), believe
Hi all,
Can someone please help and advise if it is possible to have the output of
the code below to the screen and at the same time to the file as well?
open(ORA, "| dgmgrl > dgmgrl.out" ) or die "Can't pipe to dgmgrl: $!";
print ORA "connect
sys/passw...@${connect_string_02}\n
";
print ORA "sho
grl | tee dgmgrl.out" ) ?
>
> this begs the whole question of why the OP isn't using DBI.
>
> yy> 2010/5/27 newbie01 perl :
> >> Hi all,
> >>
> >> Can someone please help and advise if it is possible to have the output
> of
> >> the
Hi all,
With multiple Perl install, there will be multiple versions of the same
modules.
How can you change the order of where @INC look for the specific version of
the module that you want to use? Is this done by using use lib?
use lib qw(/path/to/one/library /path/to/another .. );
Hi all,
Just need to confirm if this is the expected behaviour when setting
PERL5LIB.
If I have the folllowing in my script ...
==
#!/usr/bin/perl
$ENV{PERL5LIB}="/oracle/product/db/11.1/perl/lib/site_perl/5.8.3/x86_64-linux-thread-multi"
Hi all,
Can someone advise how to set LD_LIBRARY_PATH from within the Perl scripts?
If I set LD_LIBRARY_PATH from the command line, all is okay
[oracle ~]$ perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";'
Can't load
'/oracle/product/db/11.1/perl/lib/site_perl/5.8.3/x86_64-linux-threa
Hi,
Am trying out DBI for Oracle and just want to know if for example, I need to
include column formatting stuff etc., is it best to just put them into a
.sql file and then execute the .sql file instead of placing them in the Perl
DBI script?
Also, is there anyway to sort of "hide" the password s
Hi all,
I know perl -V prints what are the current modules directories that are
accessible ... but is there a way to list all the available modules from
each directories as well?
Hi all,
Sorry for being lazy I guess but am assuming a lot of you will probably
have a list of their favorite sites for resources of Perl scripts
I did find a lot as well via Google but mostly Perl CGI stuff though ...
Basically, am wanting to know where is the "best" place to find scripts
Hi all,
Just writing to ask if any one can advise on what tools to use best for
maintaining your scripts ... preferably free/open source and portable if
there is one, that is, one that can be placed and run on a USB stick ...
At the moment, am having them in directories and files and no versionin
Hi all,
Oracle core dumps are created as directories. I want to remove these
directories after a certain period of time, for example 10 days.
I have the following script that searches a directory for files that are
older than 10 days and possibly remove them. At the moment, for the sake of
testin
2010/6/7 Shlomi Fish
> On Sunday 06 Jun 2010 19:59:36 Wojciech Ĺysiak wrote:
> > On 06.06.2010 18:12, newbie01 perl wrote:
> > > Hi all,
> > >
> > > Oracle core dumps are created as directories. I want to remove these
> > > directories after
On Mon, Jun 7, 2010 at 3:25 PM, Uri Guttman wrote:
> >>>>> "np" == newbie01 perl writes:
>
> np> I found a better example at a Perlmonk posting and changed it a bit as
> np> below:
>
> np> #!/usr/bin/perl
> np> use strict;
>
&g
loop ... The script is to search
the core dump directory but exclude that directory, kinda like doing a grep
for ^/u01/oradump/cdump, /u01/oradump/cdump$/ and exclude that from the
directory to remove.
On Mon, Jun 7, 2010 at 4:32 PM, Uri Guttman wrote:
> >>>>> "np" =
g the @ARGV ...
Your hacked pseudo-code works fine and does what am looking for ... Thanks
...
On Mon, Jun 7, 2010 at 6:45 PM, Uri Guttman wrote:
> >>>>> "np" == newbie01 perl writes:
>
> np> Hi Uri,
> uri> first off please edit the quote
Hi Uri,
Oops ... sorry, I think I've explained it wrong ...
I mean, supposedly, the script is to scan the sub-directories of $ARGV[0]
but not include $ARGV[0] in the list so I've modified the pseudo-code hack
that you provided to do just that ...
Hi all,
Does anyone know if someone had written a Perl stat script that mimics the
Linux' stat command?
I want to be able to use the stat command on Solaris, unfortunately, I just
found out that that command is not available on Solaris and HP-UX so am
thinking a Perl script should be the way to g
Hi all especially Perl teachers if anyone is ... :-)
I just want to know if someone can provide some explanation on how does the
argument iterator sub-routine below work. The Perl script is called from a
UNIX Korn script as below:
mail_smtp.pl -r ${MAILFROM} -s "$subject_line TEST EMAIL"
supportm
Hi Brandon,
Thanks ... using the cat and pipe looks "cleaner" ... I will try that one
... thanks
On Fri, Jul 23, 2010 at 4:53 AM, Brandon McCaig wrote:
> On Wed, Jul 21, 2010 at 1:17 PM, newbie01 perl
> wrote:
> > Does $_ contains the following values on each iteration
Hi,
Do the following set of codes does the same thing?
FYI, am more interested on whether I can use CODE 03 to pipe/re-direct
output from the OS commands, i.e. ps, df etc. Will using | works on Windows
as well?
Am very new to Perl and has mostly done UNIX shell scripting. Am wanting to
write Per
Hi all,
Am wanting to get some advise on how to write this Perl script.
I have a backup directory that I have to check for the existence of file/s
and if the latest file that exist there is 2 days old, that means I have a
problem and had to send an email notification.
To illustrate if, for examp
Hi all,
Just want to know what improvement can be done with the code below if any. I
am sure a lot of improvement/changes is required. I will be calling this
script from a UNIX script, i.e.timediff=`timediff.pl $file`, so $file will
be passed to the Perl script. It's probably a good idea to check
Hi,
Does anyone know of any permission bit "translator"? One that can
translate the permission bit from its textual value to its octal value
and vice versa. It is alright if it is always just rwx but on a lot of
occasions nowadays, getting a lots of s, S, t, etc.
-rwxrwxrwx 1 oracle dba
Hi all,
In Oracle, there is a file named tnsnames.ora that contains connection
strings to Oracle Databases.
At the moment the file is 1+ lines long. We are currently having a
problem where the file is malformed, i.e. missing matching brackets. Can any
of the experts please advise how best to
Hi all,
I've written a Perl script below that check and report for malformed braces.
I have a UNIX ksh version and it took a couple of minutes to run on a 1+
lines. With the Perl version it only took about 20 seconds so I decided to
do it the Perl way. Besides I need a similar thing for Window
Hi,
Am just trying out this bracket checker script but when I ran it, it is
giving errors below.
Just curious to know what the error is about? Please advise. Thanks
Error below:
http://pastebin.com/d8GNL0kx
./123.pl testfile01x.ora
Malformed UTF-8 character (unexpected continuation byte 0xbb)
Hi John,
For checking a 10,+ lines, your code cut down the processing time from
30 seconds to a mere 5 seconds, amazing.
Thanks a lot.
On Thu, Jul 28, 2011 at 10:04 PM, John W. Krahn wrote:
> newbie01 perl wrote:
>
>> Hi all,
>>
>
> Hello,
>
>
> I
Hi all,
I have several *nix version of Unix and while some I can use df -h, for some
I can't. The only common thing that I can use that works for all is df -k.
Below is the output when running df -k:
Filesystem
Hi all,
Playing around with Getopt::Std as am trying to convert a UNIX Korn Shell
Script to a Perl script.
Is it possible to check for what are the values for opterr, optarg, optind?
How? :(-
I've been Googling for quite sometime now and can't find an example of Perl
scripts that checks for opte
011 at 5:07 PM, Brandon McCaig wrote:
> On Thu, Oct 20, 2011 at 11:45 PM, newbie01 perl
> wrote:
> > Playing around with Getopt::Std as am trying to convert a UNIX
> > Korn Shell Script to a Perl script.
> >
> > Is it possible to check for what are the values for opt
Hi all,
Am trying to write/convert a customized df script in Perl and need some help
with regards to using arrays and file handlers.
At the moment am using
system("df -k > /tmp/df_tmp.00");
To re-direct the df output. Am using df -k because some of the Solaris and
HP servers does not have df -h
Hi Rob,
Thanks for your response and to everyone else who had given their thoughts,
especially John. This whole exercise is turning out to be a "fun" way of
learning arrays and print formatting.
I tried the script that you suggested and it is giving some error and not
sure how to get around it. F
Hi all,
I am looking for a Perl script or something similar that I can use to test
connection from a client PC to several databases on a server.
Does anyone know of any such script lying around somewhere :(-
Currently, am testing connection from a client PC to an Oracle DB using
Oracle's sqlplus
Hi all,
I have a config file that contains some text as below:
server01:/u01/app/oracle/admin/db01/adump :*.dmp,5
:compress :/bin/gzip
server01:/u01/app/oracle/admin/db04/adump :*.aud,5
:remove :/bin/rm
server01:/u01/app/oracl
sample code
below is a big help. Thanks again.
On Sun, Sep 16, 2012 at 12:28 AM, Rob Dixon wrote:
> On 15/09/2012 02:52, newbie01 perl wrote:
> > Hi all,
> >
> > I have a config file that contains some text as below:
> >
> > server01:/u01/app/oracle/admin
Hi,
Does anyone know of any great source/link for tutorials on menu driven Perl?
Thanks in advance.
58 matches
Mail list logo