-   Linux - Newbie (
-   -   Noob question about matching texts (

teranom 03-04-2009 06:43 AM

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:

Created Date-Created:03/04/09 @ 04:34:28 AM CST Status:Flagged For xxxx

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

what can I do?

wolfger 03-04-2009 08:31 AM

I think the command you are looking for is sed.
Something like:
sed -i '/ 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 :-)

teranom 03-04-2009 08:42 AM

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.