Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 01-13-2007, 09:14 PM   #1
Registered: Aug 2003
Posts: 232

Rep: Reputation: 30
find for key word

Hi all,

I have bunch of files start out with error_log_........
in these log file and there are an error that I am interested (error number 307). Any way, I am looking for a command where I can look into all of these files for these error and write to another file say test.txt and below is the command I use but doesn't seem to work.

$cat error_log* |grep 307 > test.txt

doesnt' seem to work, can someone please give me some advises?

Old 01-13-2007, 10:53 PM   #2
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
This may get you started...

for i in $(cat error_log_* | grep 307 ); do
   echo $i >> test.txt


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to key in chinese word in suse? TigerLinux SUSE / openSUSE 2 10-10-2005 08:31 AM
The HorizSync key word must followed by a list of numbers or ranges comox *BSD 2 03-14-2005 03:57 AM
c language question: key word PARAMS powerplane Programming 4 04-30-2003 04:07 AM
find a word 2 jojo Programming 4 02-23-2003 09:55 AM
Find a word. jojo Programming 6 02-21-2003 11:27 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:35 AM.

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