Re: unlinking all files that contain a specified string

2002-07-15 Thread John W. Krahn
James wrote: > > hi, all! Hello, > friday while trying to clean up a directory, i thought i > could bang out a quick-and-dirty perl script that would > let me achieve what i needed, to delete all text files in > a subdirectory that contain a specified string. i was able > to use the perl comman

RE: unlinking all files that contain a specified string

2002-07-15 Thread Timothy Johnson
t tested these yet, but you get the idea... -Original Message- From: james [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 12:52 PM To: [EMAIL PROTECTED] Subject: unlinking all files that contain a specified string hi, all! friday while trying to clean up a directory, i thought i could ban

Re: unlinking all files that contain a specified string

2002-07-15 Thread Tanton Gibbs
IL PROTECTED]> Sent: Monday, July 15, 2002 4:13 PM Subject: Re: unlinking all files that contain a specified string > What about (assuming *nix) > > use strict; > > my $search_string = "Whatever you want to find"; > > my @found = `grep -ls $search_string *`; > chom

Re: unlinking all files that contain a specified string

2002-07-15 Thread Tanton Gibbs
: <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 3:51 PM Subject: unlinking all files that contain a specified string hi, all! friday while trying to clean up a directory, i thought i could bang out a quick-and-dirty perl script that would let me achieve what i needed, to delete all text file

unlinking all files that contain a specified string

2002-07-15 Thread james
hi, all! friday while trying to clean up a directory, i thought i could bang out a quick-and-dirty perl script that would let me achieve what i needed, to delete all text files in a subdirectory that contain a specified string. i was able to use the perl command unlink(filename) and grep manua