[HPADM] convert shell script to perl
From: Neeraj Lal (neeraj_lal_at_fastmail.us)
Date: 08/18/04
- Previous message: Endro Koesno: "[HPADM] [Summary] Swap Problem on HP-UX 11.11"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "HPADM LIST" <hpux-admin@dutchworks.nl> Date: Tue, 17 Aug 2004 22:42:28 -0400
Hi Admin
Can any one help me in converting the following script into perl as I am
new to perl
#! /bin/csh -vx .f
#Variable Definition
set LogFile_Name = $1;
set Err_String_file = "Error_Strings.dat"
set Backup_Dir = "/home/lalne/logfiles"
set ext = `date -u | awk '{print $2$3$6$4$5}'`
#Checking For The Crash Error in Log File
set Return_Code = `tail -100 $LogFile_Name | /usr/bin/egrep -f
$Err_String_file | wc -l`
echo $Return_Code
if ( $Return_Code != 0 ) then
cp $LogFile_Name $Backup_Dir/$LogFile_Name.$ext
else
echo "No Problem"
endif
set Server_Name = `echo $LogFile_Name | awk -F. '{print $1}'`
set Infra_Name = `echo $LogFile_Name | awk -F. '{print $2$3$4}'`
echo "The Problem is on Server $Server_Name and Infra Name is
$Infra_Name"
--
---> Please post QUESTIONS and SUMMARIES only!! <---
To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
Name: hpux-admin@dutchworks.nl Owner: owner-hpux-admin@dutchworks.nl
Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only)
http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)
- Previous message: Endro Koesno: "[HPADM] [Summary] Swap Problem on HP-UX 11.11"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|