You might want to use copy-port here.

Robby

On Mon, Jan 25, 2016 at 11:50 PM, Benjamin Greenman
<benjaminlgreen...@gmail.com> wrote:
> If you don't mind all the indentation, this one is streaming.
>
> (define (concat file* destination)
>   (with-output-to-file destination #:exists 'append
>     (lambda ()
>       ;; 'cat' each file
>       (for ([f (in-list file*)])
>         (with-input-from-file f
>           (lambda ()
>             (for ([ln (in-lines)])
>               (displayln ln))))))))
>
> On Tue, Jan 26, 2016 at 12:39 AM, Scotty C <costo...@hotmail.com> wrote:
>>
>> here's what i'm doing. i make a large, say 1 gb file with small records
>> and there is some redundancy in the records. i will use a hash to identify
>> duplicates by reading the file back in a record at a time but the file is
>> too large to hash so i split it. the resultant files (10) are about 100 mb
>> and are easily hashed. the resultant files need to be appended and then
>> renamed back to the original. i know that i can do this in a linux terminal
>> window with the following: cat mytmp*.dat >> myoriginal.dat. i'd like to
>> accomplish this from within the program by shelling out. can't figure it
>> out. other methodologies that are super fast will be entertained. thanks,
>> scott
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to racket-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to