Re: delete file based on content

2004-01-06 Thread Jan Minar
On Mon, Jan 05, 2004 at 07:28:31PM -0500, Paul Morgan wrote: On Mon, 05 Jan 2004 18:18:00 -0600, Michael Martinell wrote: #rm `grep -li Processing completed correctly *` This worked nicely at the command line, however when I put in into a script I received the error rm :too few

Re: delete file based on content

2004-01-06 Thread Nano Nano
On Tue, Jan 06, 2004 at 08:10:44AM +0100, Jan Minar wrote: On Mon, Jan 05, 2004 at 07:28:31PM -0500, Paul Morgan wrote: [snip] rm `grep -li Processing completed correctly *` 2/dev/null This is ugly, Paul: It'd suppress not only this message, but other messages which would possibly be

Re: delete file based on content

2004-01-06 Thread Nano Nano
On Mon, Jan 05, 2004 at 11:26:51PM -0800, Nano Nano wrote: [snip] err on second thought I can see why xargs is better here -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Re: delete file based on content

2004-01-06 Thread Greg Folkert
On Mon, 2004-01-05 at 18:35, Michael Martinell wrote: Can anybody tell me what I am doing wrong? I am trying to delete files based upon content. As an example I have files called log1, log2, log3 Log 1 contains the words Processing completed correctly and can be deleted. I tried

Re: delete file based on content

2004-01-06 Thread Lucas Bergman
[ format recovered -- Microsoft pseudo-Latin1 ] Greg Folkert [EMAIL PROTECTED] writes: On Mon, 2004-01-05 at 18:35, Michael Martinell wrote: I am trying to delete files based upon content. As an example I have files called log1, log2, log3 Log 1 contains the words Processing completed

Re: delete file based on content

2004-01-06 Thread Paul Morgan
On Tue, 06 Jan 2004 08:10:44 +0100, Jan Minar wrote: On Mon, Jan 05, 2004 at 07:28:31PM -0500, Paul Morgan wrote: On Mon, 05 Jan 2004 18:18:00 -0600, Michael Martinell wrote: #rm `grep -li Processing completed correctly *` This worked nicely at the command line, however when I put in

Re: delete file based on content

2004-01-06 Thread Micha Feigin
On Mon, Jan 05, 2004 at 11:26:51PM -0800, Nano Nano wrote: On Tue, Jan 06, 2004 at 08:10:44AM +0100, Jan Minar wrote: On Mon, Jan 05, 2004 at 07:28:31PM -0500, Paul Morgan wrote: [snip] rm `grep -li Processing completed correctly *` 2/dev/null This is ugly, Paul: It'd suppress not

Re: delete file based on content

2004-01-05 Thread Nano Nano
On Mon, Jan 05, 2004 at 05:35:26PM -0600, Michael Martinell wrote: [snip] I tried the following: grep -li Processing completed correctly * This gave me the list of logs that were complete. How can I send the results of this to the rm command. The redirection that I tried did not seem to

RE: delete file based on content

2004-01-05 Thread Michael Martinell
-Original Message- From: Tom [mailto:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 5:41 PM To: [EMAIL PROTECTED] Subject: Re: delete file based on content On Mon, Jan 05, 2004 at 05:35:26PM -0600, Michael Martinell wrote: [snip] I tried the following: grep -li Processing

RE: delete file based on content

2004-01-05 Thread Michael Martinell
Please ignore former post. It was an ID10T error on my part. -Original Message- From: Tom [mailto:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 5:41 PM To: [EMAIL PROTECTED] Subject: Re: delete file based on content On Mon, Jan 05, 2004 at 05:35:26PM -0600, Michael Martinell wrote

Re: delete file based on content

2004-01-05 Thread Laurence J. Lane
(oops, list reply) On Mon, Jan 05, 2004 at 06:08:02PM -0600, Michael Martinell wrote: #rm `grep -li Processing completed correctly *` Any other thoughts? grep -Zli Processing completed correctly * | xargs -r0 rm -v -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of

RE: delete file based on content

2004-01-05 Thread Paul Morgan
On Mon, 05 Jan 2004 18:18:00 -0600, Michael Martinell wrote: Please ignore former post. It was an ID10T error on my part. -Original Message- From: Tom [mailto:[EMAIL PROTECTED] Sent: Monday, January 05, 2004 5:41 PM To: [EMAIL PROTECTED] Subject: Re: delete file based