home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / editors / 3268 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.3 KB  |  38 lines

  1. Newsgroups: comp.editors
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!nucsrl!ddsw1!dattier
  3. From: dattier@ddsw1.mcs.com (DWT)
  4. Subject: Re: A little question on vi
  5. Message-ID: <C17npw.1uL@ddsw1.mcs.com>
  6. Date: Thu, 21 Jan 1993 15:44:20 GMT
  7. References: <1993Jan21.061448.25739@cdf.toronto.edu>
  8. Organization: Contributor Account at ddsw1, Chicago, Illinois  60657
  9. Lines: 27
  10.  
  11. g2chanhk@cdf.toronto.edu (Simon Ho Ki CHAN) asked in
  12. <1993Jan21.061448.25739@cdf.toronto.edu>:
  13.  
  14. |     Hi, is there anybody who knows how to put the EOF marker at the end of 
  15. | the last line, instead of putting it in a new line? e.g I wanna create a file 
  16. | like the following
  17. |         blah, blah
  18. |         blah, blah<EOF>
  19. |     instead of
  20. |         blah, blah
  21. |         blah, blah
  22. |         <EOF>
  23.  
  24. vi is adamant about closing a file with a trailing newline (the exception
  25. being a file consisting of only one newline, which vi insists on writing
  26. out as an empty file) when it writes a file out.
  27.  
  28. You can use another editor or, if the last line is short, leave it off, exit
  29. vi, and echo -n "text" >> file with BSD echo or echo "text\c" >> file with
  30. System V echo.  However, you'd have to do that again every time you let vi
  31. write the file again.
  32.  
  33. David W. Tamkin   Box 59297   Northtown Station, Illinois  60659-0297
  34. dattier@ddsw1.mcs.com    CompuServe: 73720,1570    MCI Mail: 426-1818
  35.