Date: Tue, 29 Jun 2004 19:50:25 -0400 From: Bill Moran <wmoran@potentialtech.com> To: Gerard Samuel <fbsd-questions@trini0.org> Cc: freebsd-questions@freebsd.org Subject: Re: Means of trimming files Message-ID: <20040629195025.549fe8f3.wmoran@potentialtech.com> In-Reply-To: <200406291646.28811.fbsd-questions@trini0.org> References: <200406292005.i5TK5nZ18158@clunix.cl.msu.edu> <200406291621.22848.fbsd-questions@trini0.org> <200406291646.28811.fbsd-questions@trini0.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Gerard Samuel <fbsd-questions@trini0.org> wrote: > On Tuesday 29 June 2004 04:21 pm, Gerard Samuel wrote: > > So Ill start using truncate() for now, and start investigating perl. > > Thanks.... > > > > As I was writing the previous email, I thought about combining find with php's > cli interface and came up with this "dirty" command (all in one line) -> > > find ./ -name '*.php' -exec php -r '$f = file_get_contents("{}"); $h = > fopen("{}", "wb"); fwrite($h, trim($f)); fclose($h);' \; > > It did the job perfectly. Now _that's_ using the tools ... and the tools you know to boot! -- Bill Moran Potential Technologies http://www.potentialtech.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040629195025.549fe8f3.wmoran>