LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 04-06-2010, 09:43 AM   #1
shyork2001
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Rep: Reputation: 0
Can anyone guide me with the BSCH scripting


Hi,

I am new to BASH script. I am working on the script to parsing the log message . the followings are my task:
1. Read the multiple log files, such as N1-2009-10-01, N2-2009-10-2, N3-2010-01-02....
2. Parse the specific message, such as "aaaa"
3. If found the "aaaa" message in the log file and export to excel file

PS. i use zgrep:
zgrep -a --text "aaaa" * > /home/TTS/myfile

and inside file looks like:

N3.2009-11-26-03-05-02.console.log.tar.gz:2009-11-25 20:12:57,429 - aaaa
N4.2009-11-29-00-25-03.console.log.tar.gz:2009-11-28 10:42:18,209 - aaaa
N6.2009-12-01-10-05-02.console.log.tar.gz:2009-12-01 10:00:24,902 - aaaa

How can i use the script export these information into excel file into three columns, like
N3 2009-11-25 20:12:57 aaaa
N4 2009-11-28 10:42:18 aaaa
N6 2009-12-01 10:00:24 aaaa


Thanks
 
Old 04-06-2010, 09:47 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Continue here:
http://www.linuxquestions.org/questi...essage-800205/

Last edited by pixellany; 04-06-2010 at 09:48 AM.
 
  


Closed 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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Noobs Guide to Bash-Scripting penguinboy08 Linux - Newbie 3 05-12-2008 05:54 PM
Link to basic bash scripting e-guide envisage Programming 10 02-03-2008 04:34 AM
Shell scripting guide / tutorial rockymaxsource Linux - General 6 06-01-2007 03:02 AM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration