Re: The infamous ^Z problem



CBFalconer <cbfalconer@xxxxxxxxx> writes:
Eigenvector wrote:

... snip ...

Actually `tr` absolutely doesn't work here, the ^Z is its death
(same with sed, batch VI, and a host of other shell related
commands), but I won't discuss that here. Besides I will at some
point need to port this to Windoze.

Then you should probably be using EOF. The Unix/Linux equivalent
of ^Z is ^D. Depends on where your input originates.

Eigenvector was talking about ^Z characters (ASCII 26) in a file.
Since he was opening the input file in binary mode, the character used
to signal an end-of-file on interactive input should be irrelevant.

I still don't know why he was having the problems he described, but
he's since solved them.

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.



Relevant Pages

  • Side-effecting input FD logical record hazardous?
    ... logical record in the FD area for a variable-length ... Characters beyond the length just READ, ... input file I desired to clean up "on the fly", ... I tried doing a READ INTO into a Working-Storage ...
    (comp.lang.cobol)
  • Re: XP Serial Number Questions
    ... That was my original thinking too but now that you have corroborated my ... how can I ever be sure that the key for the OEM Win XP I ... So you have 2 groups of characters. ... >> might be a installation CD batch number. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: basic python questions
    ... exceptions. ... Do you want the program to continue if you have no input file? ... create a string of all the characters that you consider as valid in ... the string. ...
    (comp.lang.python)
  • Re: Input past end of file
    ... characters" it contains, and what you want to happen to them. ... >Open strFileName For Binary Access Read Shared As intInputFileHandler ... >So, if the input file has multiple lines, but sometime it can have binary ...
    (microsoft.public.access.modulesdaovba)
  • Re: postscript terminal - how to typeset a unicode character (correct syntax)?
    ... The help system says that one can request Unicode ... characters by setting "set encoding utf8". ... pass it to the postscript terminal by adding to the 'set term postscript' ... that is what has happened to your input file. ...
    (comp.graphics.apps.gnuplot)