I have read chapter 7 in Programming Perl and still don't have a clue. I am looking for a pattern like this.
if (/hscsunp1/) {
print $_;
The only problem is that it prints everything on that line I just want the pattern I have specified. If I'm writing korn shell nawk works great, I just...
I have a script that extracts data. I want the data that it extracts to be printed on the same line. I can't seem to make it work. It extracts the data but prints each find on a new line. The data that is being extracted also has to be delimited by a semi-colon. Here is the script...
What I have is some log files that are created by a scheduler we run our jobs through (OS Solaris 8). The date in the logfile is of this format Fri Jan 9. I would like to extract this out of the file and convert it to this format 2004-01-09 and put it in a new file. Is there a way to do this.
I would like to write a script that searches for a pattern in a line.
The line will look something like this:
Index Filename CreationDateCreationTime Bytes Download
1 samename.001 Y
2 samename.002 N
I...
I have downloaded a kernel update to my pc then ftp'ed to my linux box. How can I install the updated kernel. The box has no connectivity to the outside world so I can't do the up2date command. The kernel update is an rpm, I thought I could just do rpm -i kernelversion to install but that...
I did the htpasswd -c /www/passwd/password/user as per instructions on apache.org then chmod 640 on directory passwd and changed group to nogroup. I added this:
<Directory /www/htdocs/proftp-admin>
AuthType Basic
AuthName "Proftp Admin"
AuthUserFile /www/passwd/password...
Solaris 9 box with Mysql on it and configured. I am trying to install proftpd now and it craps out on me.
This is what I do
cd to source
./configure --with-modules=mod_sql:mod_sql_mysql --with-includes=/usr/local/include --with-libraries=/usr/local/lib/mysql
This runs fine, dosen't crap out...
New to linux, but I know on unix that you can backup to a remote tape drive with a command like this:
ufsdump 0uf somesystem.somedomain.com:/dev/rmt/0cbn /usr
Can this been done on Linux Advanced Server 2.1
I have a script below, that I would like to run on system startup or reboot. I have tried it in /etc/rc5.d and /etc/rc3.d the script is owned by root and is executable. I not sure what's wrong any help would be appreciated. The script will run fine from the command line.
#!/bin/bash
#This...
I want this script to run if the server is rebooted. I can run it from the command line and it starts fine. Could someone tell me what's wrong.
#!/bin/bash
#This will set environment controls for Web to go and Start the processes.
webpid=`ps -ax|grep web|grep -v grep|gawk '{print $1}'`
if [[...
I have written a perl script that concatenates files together. Pass arguements to the script on the command line. This is the way it goes:
$inputdir = <STDIN>;
my question is can you have perl to do this instead:
$inputdir = $1
I know in bourne and korn you can. The reason why I ask is...
What I want to do is open a directory read the filenames in that directory and compare them to a file that has all the names of the files from the directory. When it finds files in the directory that are new ie. not in the file holding the filename, copy them to staging directory and update the...
I can't really find in information on this. I am running Red Hat Advanced Server 2.1. We are installing oracle 9i on it and some kernel parameters need to be checked or changed. How do I check them and change them. This is what I need to check and possibley change.
Core File Size
Data Seg...
Here is the script:
#!/usr/bin/perl -w
@tape = `vmquery -pn NT_Offsite_Pool`;
if ($tape[6] eq "TLD - Tape Library DLT (8)") {
print $tape[1];
}
The script is supposed to query netback for tape that are in the NT_Offsite_Pool. When it finds a line with TLD - Tape Library DLT (8) it...
I have a perl script that I am working on. I would like for it to open the messages file and check for errors and warning. I want the check to be date specific though. I would also like for it to remove duplicate lines too. This is what I have so far.
#!/usr/bin/perl -w...
I have an ftp server running SunOS5.6 it recieves some excel documents. The problem is that when the files are ftp'ed to another unix server and then picked up by the user and put on their local harddrive it gives the error that it can't be accessed or that it is read only. I have tried the...
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.