The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk script required for finding records in 1 file with corresponding another file. RRVARMA Shell Programming and Scripting 2 07-18-2008 01:20 PM
Shell Script --- Delete ORA error from data file sk005 UNIX for Dummies Questions & Answers 1 09-25-2007 06:26 PM
Shell script to append a time for the existing error log file gsprasanna UNIX for Advanced & Expert Users 12 07-12-2007 06:07 AM
Finding error code nitinkgoud SUN Solaris 2 07-15-2006 01:43 PM
Error while creating .tar file using script Rakesh Bhat Shell Programming and Scripting 1 12-30-2005 01:40 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-17-2008
himvat himvat is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 68
Smile script for finding an error from a log file

Hi ,

I have a doubt about a shell script to find an ERROR from the log file. But I need to specify a the scan from a particular date and time in the log. Till now I have developed the following script. Please suggest what shall I add in this for date and time. If the script finds a particular error it should throw 1 or else 0.


#!/bin/sh
# Script to find the error in the log file
ERROR="SCHD0061E"
read ERROR
if [ $ERROR="SCHD0061E" ] ;then
echo "1";
else echo "0"
fi

Kindly suggest what else is missing from this script. And how to specify the path for the log file .

Thanks & Regards


Last edited by himvat; 11-17-2008 at 03:25 PM..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0