Date: Tue, 29 Jun 2004 16:46:28 -0400 From: Gerard Samuel <fbsd-questions@trini0.org> To: freebsd-questions@freebsd.org Cc: Bill Moran <wmoran@potentialtech.com> Subject: Re: Means of trimming files Message-ID: <200406291646.28811.fbsd-questions@trini0.org> In-Reply-To: <200406291621.22848.fbsd-questions@trini0.org> References: <200406292005.i5TK5nZ18158@clunix.cl.msu.edu> <200406291621.22848.fbsd-questions@trini0.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406291646.28811.fbsd-questions>