pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
First project done Thanks to your help :))
2+ messages / 2 participants
[nested] [flat]

* First project done Thanks to your help :))
@ 2003-05-09 02:27 sam@casheze.biz
  2003-05-09 02:32 ` Re: First project done Thanks to your help :)) Bruno Wolff III <bruno@wolff.to>
  0 siblings, 1 reply; 2+ messages in thread

From: sam@casheze.biz @ 2003-05-09 02:27 UTC (permalink / raw)
  To: pgsql-php

Now I want to take a 300meg file and break it up into smaller files I can
read with text readers.

I just can not find how to read one file - write it out to lets say 40 files
I want to read by line for a given # of lines (I will have to just guess at
this),
then when I get to that # start writing to file 2 then to file 3 when I get
to 2 * the # then 3 *.....
figure there should be some way to set up an array (file0....file40),

I figure take my # say 10,000 move it to array(0), *2 to array(1).....

so when I get to array(1) 20,000 - I start writing to file out (array1)

Just not sure how to set it up and use arrays for files.

Thanks for any ideas.

Sam Marcotte




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: First project done Thanks to your help :))
  2003-05-09 02:27 First project done Thanks to your help :)) sam@casheze.biz
@ 2003-05-09 02:32 ` Bruno Wolff III <bruno@wolff.to>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruno Wolff III @ 2003-05-09 02:32 UTC (permalink / raw)
  To: sam@casheze.biz; +Cc: pgsql-php

On Thu, May 08, 2003 at 20:27:25 -0600,
  sam@casheze.biz wrote:
> Now I want to take a 300meg file and break it up into smaller files I can
> read with text readers.
> 
> I just can not find how to read one file - write it out to lets say 40 files
> I want to read by line for a given # of lines (I will have to just guess at
> this),
> then when I get to that # start writing to file 2 then to file 3 when I get
> to 2 * the # then 3 *.....
> figure there should be some way to set up an array (file0....file40),

The 'split' command might do what you want.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-05-09 02:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-09 02:27 First project done Thanks to your help :)) sam@casheze.biz
2003-05-09 02:32 ` Bruno Wolff III <bruno@wolff.to>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox