LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-04-2009, 07:43 AM   #1
teranom
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
Noob question about matching texts


hi all, I'm totally new to linux, and have a big problem!

I have multiple configuration files and some other files that contain an email that its line should be deleted.

it can be like this:

filexxxx:
...
Created By:xxxxx@domain.com Date-Created:03/04/09 @ 04:34:28 AM CST Status:Flagged For xxxx
...


so I want to find files contains xxxx@domain.com, and delete its matching line automaticaly in all my HDD.

what can I do?
 
Old 03-04-2009, 09:31 AM   #2
wolfger
LQ Newbie
 
Registered: Oct 2006
Distribution: Ubuntu - Feisty Fawn
Posts: 25
Blog Entries: 3

Rep: Reputation: 15
I think the command you are looking for is sed.
Something like:
sed -i '/xxxxx@domain.com/ d' *
But that doesn't work on the test box I have access to here. It says -i isn't a valid option (online man page disagrees).
Also, that would only work on the current directory. Not sure if sed can be made to work on the entire filesystem.

Sorry. Not a concrete answer, but a direction to look in at least :-)
 
Old 03-04-2009, 09:42 AM   #3
teranom
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Original Poster
Rep: Reputation: 0
thanks wolfger.

but it didnt work in my box too.

is there any other suggestions?
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pattern matching question laopi Linux - General 6 11-05-2008 12:34 PM
pattern matching question - grep cbriscoejr Programming 1 02-09-2006 09:30 PM
Perl Pattern Matching Question pete1234 Programming 2 08-27-2005 11:26 AM
CPU, motherboard and RAM matching question satimis Linux - Hardware 0 09-26-2004 12:00 PM
Complete noob question from a noob noob_hampster Linux - Software 2 09-04-2003 01:03 AM


All times are GMT -5. The time now is 04:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration