Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Shell Scripting ISBN: 0-7645-8320-4
This is the forum to discuss the Wrox book Beginning Shell Scripting by Eric Foster-Johnson, John C. Welch, Micah Anderson; ISBN: 9780764583209
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Shell Scripting ISBN: 0-7645-8320-4 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 25th, 2007, 11:00 PM
Registered User
 
Join Date: Nov 2007
Location: Bangalore, Karnataka, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default search a logfile for strings

Hi experts..

I am trying to write a shell script which will scan a log file for three strings ie success image1, success image2, success image3.
My shell is tcsh

If all the 3 strings are found then insert the 3 strings to a file1 and send mail to developers with file1

If all 3 are note found copy the strings to a file2 and send file2 to developers.

Similarly, if string image1 & image2 are found and image3 missing...then insert the string image1 & image2 to file-1 and insert the string image3 to file-2 and send a mail attaching both file1 & file2 to developer.

I tried with "if - else" but that is making the scrip longer,

Could anyone please tell me different way (ideally,using fgrep\grep\sed\awk..or other)


Thanks'
Amit

Amit...
__________________
Amit...
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search button doesn't search Access DB cbones Visual Studio 2008 1 October 27th, 2008 07:36 PM
create server side logfile from javascript senthilkumar Javascript 1 March 22nd, 2006 01:50 PM
Need Help Building a Logfile erehdogmai Excel VBA 1 May 5th, 2004 10:56 AM
FSO Logfile Problem acdsky Classic ASP Basics 2 April 11th, 2004 10:27 PM
Search engine that search through local drive! wenzation Classic ASP Basics 0 August 26th, 2003 09:15 PM



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


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.