Re: Means of trimming files

2004-06-29 Thread Gautam Gopalakrishnan
On Tue, 29 Jun 2004 19:50:25 -0400, Bill Moran <[EMAIL PROTECTED]> wrote: > > Gerard Samuel <[EMAIL PROTECTED]> wrote: > > > find ./ -name '*.php' -exec php -r '$f = file_get_contents("{}"); $h = > > fopen("{}", "wb"); fwrite($h, trim($f)); fclose($h);' \; > > > > It did the job perfectly. $ per

Re: Means of trimming files

2004-06-29 Thread Bill Moran
Gerard Samuel <[EMAIL PROTECTED]> 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 ca

Re: Means of trimming files

2004-06-29 Thread Gerard Samuel
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) -> fi

Re: Means of trimming files

2004-06-29 Thread Gerard Samuel
On Tuesday 29 June 2004 04:04 pm, Jerry McAllister wrote: > > On Tuesday 29 June 2004 01:07 pm, Bill Moran wrote: > > > Gerard Samuel <[EMAIL PROTECTED]> wrote: > > > > When editing php files, via the command line, there is a newline > > > > character after the closing ?> > > > > Im looking for a c

Re: Means of trimming files

2004-06-29 Thread Jerry McAllister
> > On Tuesday 29 June 2004 01:07 pm, Bill Moran wrote: > > Gerard Samuel <[EMAIL PROTECTED]> wrote: > > > When editing php files, via the command line, there is a newline > > > character after the closing ?> > > > Im looking for a command that would trim files, so that I can append it > > > to th

Re: Means of trimming files

2004-06-29 Thread Gerard Samuel
On Tuesday 29 June 2004 01:07 pm, Bill Moran wrote: > Gerard Samuel <[EMAIL PROTECTED]> wrote: > > When editing php files, via the command line, there is a newline > > character after the closing ?> > > Im looking for a command that would trim files, so that I can append it > > to the find command.

Re: Means of trimming files

2004-06-29 Thread Gerard Samuel
On Tuesday 29 June 2004 01:07 pm, Bill Moran wrote: > Gerard Samuel <[EMAIL PROTECTED]> wrote: > > When editing php files, via the command line, there is a newline > > character after the closing ?> > > Im looking for a command that would trim files, so that I can append it > > to the find command.

Re: Means of trimming files

2004-06-29 Thread Bill Moran
Gerard Samuel <[EMAIL PROTECTED]> wrote: > When editing php files, via the command line, there is a newline character > after the closing ?> > Im looking for a command that would trim files, so that I can append it to the > find command. > > find ./ -name '*.php' -exec SOME_COMMAND {} \; If yo

Means of trimming files

2004-06-29 Thread Gerard Samuel
When editing php files, via the command line, there is a newline character after the closing ?> Im looking for a command that would trim files, so that I can append it to the find command. find ./ -name '*.php' -exec SOME_COMMAND {} \; Thanks ___ [EMA