Hi,
I guess this might come down to more of a unix command then perl question. I want to write a script that will delete any file with similar name for the particular month.
The files under the directory are name such as below:
-rw-r----- 1 oracle dba 20353024 Jul 3 23:00...
Well, this question is rather about unix permission then scripting. I couldn't find an appropriate place to post.
Anyway, I have a question regarding unix permission. I have a file. While the owner of the file issued chmod 777 to the file. Supposedly other users should be able to write and...
I have about hundreds of files under the directory /u01/stat/oradata/arch named from 1_1_880795724.dbf to 1_177_880795724.dbf I want to rename all these files to stat_1_1_880795724.arc etc. How can I achieve this in a single command?
I wrote a perl script, but it is not working even for just...
I tried man top and the system says no manual entry for top.
I am not an OS person. I am trying to understand the TOP output
load averages: 0.25, 0.25, 0.25; up 249+00:47:10 16:04:26
173...
The purpose of my script is to go through a directory of all the files. Look at the creation date for those files. Say for example, if a file is created in 2008, I will create a 2008 folder under the directory and move the file into the new 2008 folder and loop through the whole directory with...
When I issued mysql -u root -p I got the following error message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I checked the system, it's because the mysql serice is not running on the server. Our mysql admin left the company and I am taking over...
I am fairly new to mysql. It took me a while just to login to the database. Anyway, long story short. My mysql version is 4.0.18. I have a database in mysql called commerce. I need to make an exact copy of this database (with all the tables, etc) and call the new database commerce2. How can I...
One of our dba has left the company. He used to be responsible for the mysql database. I don't have much experience with mysql. I did get to login to the server. However, when I issued mysql -u=root -p, the messages -bash: mysql: command not found returned. I issued ps -ef|more, it returned...
We did the sterling integrator 5.0 mapping test. After putting info for login dashboard server, and click the test button. It pops up a message says failed to resolve ip address. But if I use the same ip and port number and put it in internet explore address bar, it will bring up the page for me...
Right now, I have several servers with the same database name on different servers. But now I need to consolidate those databases onto one server. Obviously, I cannot have on server with five or six databases with the same name. How will I approach the migration differently? Right now I start...
I need to write a trigger that one some columns of the master table have changed, the trigger will first insert the change to a copy table. Later on, if there are more changes to the master of the same row, it will compare the new value to the old value and delete the same row in the copy table...
I have a file reads something like this:
01-JAN-2007, USER=crystal
02-JAN-2007, USER=crystal
02-JAN-2007, USER=Phillips
02-JAN-2007, USER=robinson
02-JAN-2007, USER=maguilar
02-JAN-2007, USER=cshannon
I want to sort the file with username first then the date.
My script as the following...
I have a file. The file content looks something like this:
Solution: 112329
SITUATION IDENTIFIED IN:
"Print Order Documents" (tisfc0408m000)
SITUATION DESCRIPTION:
After solution 143000 on the 2nd form, all fields are empty when starting the session. That is not correct. The fields should...
I need to write a short perl script that will open a document and read into each lines and compare the lines, if there is a duplicate, remove the duplicate lines. How am I able to achieve this?
$report_file="/apps/oracle/as400/dspfdall.dat";
open (REPORT, $report_file)||die "Can't open report...
I have this written script below:
$driver_list="/dsk01/apps/toshiba/oracle/perl/print_driver_list.fle";
open (LIST, $driver_list)||die "Can't open driver list file!\n";
$count = 0;
while ($line = <LIST>) {
($a1,$a2) = split(/:/, $line);
#print "$a2"; #for debugging
$a3 = substr($a2, 0, 1)...
I have two files A and B. The content of file A is as follows:
aaa
bbb
ccc
111
222
333
The content of file B is as follows:
111
222
333
ddd
444
eee
There are three lines in file B match those of file A. I need to write a scipt that compares those two files. If there is a match line, then I...
I have a file load_bom.ctl and the content of the file as follows:
BMIV7.5-46-60K0,INV,BMIV7.5-46-60K0.dat
DMIV7.5-46-60K0,INV,DMIV7.5-46-60K0.dat
CMIV7.5-46-60K0,INV,CMIV7.5-46-60K0.dat
AMIV7.5-46-60K0,INV,AMIV7.5-46-60K0.dat
EMIV7.5-46-60K0,INV,EMIV7.5-46-60K0.dat
I need to write a perl...
I know to read a file you can use open () by giving the file name. However, the situation I have is that under /apps/as400 directory I have lots and lots of files. I need to read them one by one. I can not hard code the file name to open because I need to open the first file, perform some tasks...
I have a file called oratabtest. The content of the file as follows:
atest:/apps/oracle/product/9.2.0:Y
btest:/apps/oracle/product/9.2.0:Y
ctest:/apps/oracle/product/9.2.0:Y
dtest:/apps/oracle/product/9.2.0:Y
I need to write a perl script to read into the file and if ctest then change the Y to...
I need to write a perl script that will read a report two lines at a time.
The report like the following:
SQL>connect aaaaa/aaaaa
Connected.
SQL>connect bbbbb/bbbbb
Connected.
SQL>connect ccccc/ccccc
ERROR
If the second line shows connected then print "aaaaa, Your Password is the same as your...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.