Article View: comp.editors
Article #38Re: Create a 1 character file ????
From: Tim Goodwin
Date: Fri, 30 Oct 1992 17:54
Date: Fri, 30 Oct 1992 17:54
28 lines
1104 bytes
1104 bytes
pjh@mccc.edu (P. J. Holsberg) writes:
>I wonder why ....
>
> I cannot create a 1 byte file with
> vi
> cat
> microemacs
>
>But all of these stick a newline character in without being asked!
Not so for cat: try
$ cat > one-byte
a^D^D
(i.e. press ctrl-d (or whatever you have EOF set to) twice).
The reason for vi behaving in this way (which I agree should be
optional, as it is in Hemlock for example) is that most UNIX utilities
use linefeed as a line terminator.
Apparently VAX/VMS treats lf (or is it crlf?) as a line separator; if
the last character in a file is lf you get a final blank line.
The obvious conclusion is that UNIX is written in C, and VMS is written
in Pascal :-).
Tim.
Technical Details
Message-ID:
<1992Oct30.175402.19509@unipalm.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!unipalm!timReferences:
<1992Oct29.230606.6401@mccc.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.editors Path: arc1-ca.pugleaf.net!sparky!uunet!unipalm!tim From: tim@unipalm.co.uk (Tim Goodwin) Subject: Re: Create a 1 character file ???? Message-ID: <1992Oct30.175402.19509@unipalm.co.uk> Organization: Unipalm Ltd., 216 Cambridge Science Park, Cambridge CB4 4WA, UK References: <1992Oct29.230606.6401@mccc.edu> Date: Fri, 30 Oct 1992 17:54:02 GMT Lines: 28