🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #2892

Re: A little question on vi

#2892
From: DWT
Date: Thu, 21 Jan 1993 15:44
27 lines
1384 bytes
g2chanhk@cdf.toronto.edu (Simon Ho Ki CHAN) asked in
<1993Jan21.061448.25739@cdf.toronto.edu>:

| 	Hi, is there anybody who knows how to put the EOF marker at the end of 
| the last line, instead of putting it in a new line? e.g I wanna create a file 
| like the following
| 
| 		blah, blah
| 		blah, blah<EOF>
| 
| 	instead of
| 
| 		blah, blah
| 		blah, blah
| 		<EOF>

vi is adamant about closing a file with a trailing newline (the exception
being a file consisting of only one newline, which vi insists on writing
out as an empty file) when it writes a file out.

You can use another editor or, if the last line is short, leave it off, exit
vi, and echo -n "text" >> file with BSD echo or echo "text\c" >> file with
System V echo.  However, you'd have to do that again every time you let vi
write the file again.

David W. Tamkin   Box 59297   Northtown Station, Illinois  60659-0297
dattier@ddsw1.mcs.com    CompuServe: 73720,1570    MCI Mail: 426-1818
Technical Details
Message-ID: <C17npw.1uL@ddsw1.mcs.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!nucsrl!ddsw1!dattier
References: <1993Jan21.061448.25739@cdf.toronto.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.editors
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!nucsrl!ddsw1!dattier
From: dattier@ddsw1.mcs.com (DWT)
Subject: Re: A little question on vi
Message-ID: <C17npw.1uL@ddsw1.mcs.com>
Date: Thu, 21 Jan 1993 15:44:20 GMT
References: <1993Jan21.061448.25739@cdf.toronto.edu>
Organization: Contributor Account at ddsw1, Chicago, Illinois  60657
Lines: 27