John W. Krahn wrote:
Dr.Ruud wrote:
brian54321uk schreef:

I would like to test a folder full of files, and if a file contains
abc123blue or xyz357green then that file is to be deleted.
What would be the best way of achieving this please?

I would use `grep -l` to get the list of filenames, and rm to unlink
them.
No Perl involved.

That can get tricky if any of the file names contain whitespace or other funny characters.


John

More food for thought for me, but "tricky" is something that I will leave for later once I get a bit more familiar with what I want from PERL.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to