Jump to content

- - - - -

Extra blank line in download text file (.txt)

18 replies to this topic

#16 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 30 September 2005 - 05:16 PM


It's not a pretty solution. If you are on a Unix box, the following commands will kill the final line of the file.

linecount=`expr $file - 1`
tail -$linecount $file > $file2

FYI: I wrote a quick update to write one line of text to an SEQ file. I used the ALIAS command as well.

On ProIV 5.5 r 5.1.7, on RedHat ES 3.0, I did not get a blank line.



#17 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 701 posts
  • Gender:Not Telling
  • Location:Rural France

Posted 30 September 2005 - 07:57 PM

Hmm.. I've never used ProIV on Windows but..

Sounds a bit like ProIV is terminating the last line (probably with CRLF) when in fact Windows programs don't expect the last line to be terminated (ie. CRLF is really a line separator sequence not a line terminator for Windows text files).

On Unix, terminating the last line (with an LF) is correct and does not result in the appearance of a final blank line (ie. on Unix the LF character is a terminator not a separator).

If that's the case (and I am just speculating) then yes it's a pretty basic bug in ProIV B)
Nothing's as simple as you think

#18 Vol Yip

Vol Yip

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Hong Kong

Posted 01 October 2005 - 06:23 AM

I think the "problem" is simply because when proiv finishes the last line, it has a CRLF and hence advances to a new line. I am not sure if we can "explicitly" remove CR/LF at each line when write to external file and put "explicitly" back the CR/LF by logic. Then we can remove the last CR/LF.

Edited by Vol Yip, 01 October 2005 - 06:24 AM.

#19 space



  • Members
  • Pip
  • 6 posts
  • Gender:Female
  • Location:Malaysia

Posted 03 October 2005 - 03:23 AM

I have try by changing the SEQ file to BIN. The blank line can be eliminated but a lot of spacing exists behind the line.

IF put CHAR, a box will appear in the text file. This is wrong!! <_<

Reply to this topic


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users