Re: Means of trimming files
From: Gerard Samuel (fbsd-questions_at_trini0.org)
Date: 06/29/04
- Previous message: Ade Falusi: "HP visulaize B132 workstation"
- In reply to: Gerard Samuel: "Re: Means of trimming files"
- Next in thread: Bill Moran: "Re: Means of trimming files"
- Reply: Bill Moran: "Re: Means of trimming files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: freebsd-questions@freebsd.org Date: Tue, 29 Jun 2004 16:46:28 -0400
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.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
- Previous message: Ade Falusi: "HP visulaize B132 workstation"
- In reply to: Gerard Samuel: "Re: Means of trimming files"
- Next in thread: Bill Moran: "Re: Means of trimming files"
- Reply: Bill Moran: "Re: Means of trimming files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|