This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. ---- extPart_ST_15_42_33_Tuesday_July_02_2002_17570 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable >>> hal9000 / hypermetrics.com 7/2/02 12:28PM >>> ----- Original Message ----- From: "Massimiliano Mirra" <list / NOSPAMchromatic-harp.com.web-hosting.com> To: "ruby-talk ML" <ruby-talk / ruby-lang.org> Sent: Tuesday, July 02, 2002 12:19 PM Subject: Re: Question: ruby vs. ksh > recurse(dir) do |item| > File.delete(item) > end > > > Find.find is very similar, though it first visits directories and then > their content (preventing to delete directories), and does not change > the current dir. `find #{start} ! -type d`.each { |file| File.delete(file) } ksh again :-O ....Hal Fulton said: > It might also be good to have an iterator that only > visited directories. But I haven't thought that through. `find #{start} -type d`.each { |dir| .... } ksh yet again.... :-O ---- extPart_ST_15_42_33_Tuesday_July_02_2002_17570 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 5.50.4912.300" name=GENERATOR></HEAD> <BODY style="MARGIN-TOP: 2px; FONT: 8pt Microsoft Sans Serif; MARGIN-LEFT: 2px"> <DIV>>>> hal9000 / hypermetrics.com 7/2/02 12:28PM >>><BR>----- Original Message ----- <BR>From: "Massimiliano Mirra" <list / NOSPAMchromatic-harp.com.web-hosting.com><BR>To: "ruby-talk ML" <ruby-talk / ruby-lang.org><BR>Sent: Tuesday, July 02, 2002 12:19 PM<BR>Subject: Re: Question: ruby vs. ksh<BR><BR>> recurse(dir) do |item|<BR>> File.delete(item)<BR>> end<BR>> <BR>> <BR>> Find.find is very similar, though it first visits directories and then<BR>> their content (preventing to delete directories), and does not change<BR>> the current dir.</DIV> <DIV> </DIV> <DIV>`find #{start} ! -type d`.each { |file|</DIV> <DIV> File.delete(file)</DIV> <DIV> }</DIV> <DIV> </DIV> <DIV>ksh again :-O</DIV> <DIV> </DIV> <DIV>....Hal Fulton said:</DIV> <DIV> </DIV> <DIV>> It might also be good to have an iterator that only<BR>> visited directories. But I haven't thought that through.</DIV> <DIV> </DIV> <DIV>`find #{start} -type d`.each { |dir|</DIV> <DIV> ....</DIV> <DIV> }</DIV> <DIV> </DIV> <DIV>ksh yet again.... :-O</DIV> <DIV> </DIV></BODY></HTML> ---- extPart_ST_15_42_33_Tuesday_July_02_2002_17570--