Re: leading null characters produced in script...



In article <1162196467.874765.323380@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Avalon1178 <Avalon1178@xxxxxxx> wrote:
:
:I think I understand what you're saying. There is only one
:complication: The "otherScript" that I mentioned is considered a
:script that I have no control over (Sure, since it is also a script I
:can modify it...but preferably not, since this is considered, well, for
:lack of a better word, "third-party" script). All it does is it does
:some processing, and it prints processing info to stdout. The only way
:to capture these is by redirection, hence "./otherScript >$logfile".

Easy fix. Change your redirection to _append_ to the log file:

./otherScript >>$logfile

When a file is opened in append mode, there is an implied seek to EOF
before every write(2) call. Now, when your log rotation truncates the
file to zero length, the next write will seek to offset 0 instead of
continuing at its current (large) offset.

--
Bob Nichols AT comcast.net I am "RNichols42"
.



Relevant Pages

  • Re: Absolute element offsets--exercise in futility
    ... script like jQuery was only an issue if calling apps ... browser scripting neophytes: calculating offset positions. ... handful of browsers supported by jQuery. ...
    (comp.lang.javascript)
  • Re: Absolute element offsets--exercise in futility
    ... script like jQuery was only an issue if calling apps ... browser scripting neophytes: calculating offset positions. ... handful of browsers supported by jQuery. ... With the rise of JavaScript libraries over the last couple of years, ...
    (comp.lang.javascript)
  • Re: Daylight Savings Time
    ... >I am trying to convert local time to GMT in a script. ... I can get the GMT offset ... I got the same number I get for standard time. ...
    (microsoft.public.scripting.vbscript)
  • Daylight Savings Time
    ... I am trying to convert local time to GMT in a script. ... I can get the GMT offset ... I got the same number I get for standard time. ...
    (microsoft.public.scripting.vbscript)
  • Re: Stabilizing the drift file?
    ... Assuming your system specification allows for up to 10 ms measurement error over two seconds, your script can result in a maximum frequency ... The requirements of max. 100ms external offset, ... minpoll 4 maxpoll 4" for those blades requiring <10ms among themselves ...
    (comp.protocols.time.ntp)