Re: Script to create huge sample files



On Sunday 03 Jan 2010 07:12:32 Parag Kalra wrote:
Thanks Shlomi for your expert comments and I must admit you have got a very
strong vision. :)


You're welcome.

Anyways coming to my first question:
a.) What do I need to do to make sure that length of new file will

increase

every time the step 4 is executed.

Although it may have nothing to do with this algorithm but I still thought
of discussing it.

Say I have scripts that dumps some contents on to an output file handler
inside a long loop. With such scripts I have noticed 2 types of behaviour.

1. The size of this output file is zero while the script is getting
executed inside the loop and it increases only when the script execution
gets over.

2. And sometimes I have noticed that the size of output file increases
every time some data is dumped on to it. Thus increase in size happens in
real/run time.

I want to control this behaviour. What I can guess is that it has something
to do with output buffer.


Please read "Suffering from Buffering":

http://perl.plover.com/FAQs/Buffering.html

Regards,

Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Optimising Code for Speed - http://shlom.in/optimise

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )
.



Relevant Pages

  • Re: finding group user belongs too
    ... Thank you all for your input, have tried all the scripts, and would like to ... aFile.Delete ' now delete the output file. ... Function DisplayGroups (strObjectADsPath, strSpaces, dicSeenGroup) ... colGroups = Array) ...
    (microsoft.public.scripting.vbscript)
  • How do I redirect output to a file and to the console screen?
    ... I'm doing some TELNET and FTP sessions with my scripts. ... redirect all the output to an output file, ...
    (comp.lang.python)
  • Re: DCL script for a dummy like me ...
    ... > I'm trying to do my first DCL scripts but I'm in trouble. ... > output file. ... You will want to look at the lexicals: ... $OPEN/WRITE logfile MYLOGFILE.TXT ...
    (comp.os.vms)
  • Re: Just asking - Tips on how to maintain your scripts ..
    ... Just writing to ask if any one can advise on what tools to use best for ... maintaining your scripts ... ... Shlomi Fish http://www.shlomifish.org/ ...
    (perl.beginners)
  • Re: dd PATCH: add conv=direct
    ... output buffer is getpagesize-aligned. ... Pad every input block to size of @sampwith trailing zero bytes. ... +Call @sampon the output file before exiting. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)