![]() |
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? |
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 :-) |
thanks wolfger.
but it didnt work in my box too. is there any other suggestions? |
All times are GMT -5. The time now is 08:58 AM. |