Path: utzoo!utgpu!watserv1!ria!alex.ctrg.rri.uwo.ca!lrb From: lrb@alex.ctrg.rri.uwo.ca (Lance R. Bailey) Newsgroups: comp.sys.hp Subject: Re: How to lose a file using HP-UX's vi !!!!!!!!! Message-ID: <2103@ria.ccs.uwo.ca> Date: 23 Jan 91 11:41:57 GMT References: <796@sdrc.UUCP> <101950176@hpcvlx.cv.hp.com> Sender: news@ria.ccs.uwo.ca Organization: CTRG, Robarts Research Institute London, Canada Lines: 27 In article <101950176@hpcvlx.cv.hp.com> tomg@hpcvlx.cv.hp.com (Thomas J. Gilg) writes: > >> resides becomes full while you are in vi, vi won't tell you it can't write >> the file back out and it will then exit !!!!!! > vi gives you some >short cuts for writing/exiting, but at the expense of safety. I've run >into disk full situations before and the ":wq" way out has protected me. here here! the shortcut is "ZZ" and the person who thought of it should be shot. I teach all my niave users to use :wq because ZZ is 'helpful' and can cause grief occasionally. my favourite example is user sends mail (automatic vi edit) because they want a copy of all outgoing mail i wrote a macro for 'p' that does :w ! lp -dlj -onobanner^M^M to write the letter to the laser. now they were doing this as the last thing before exiting the editor, (why get a copy of what wasn't sent) then when the used ZZ to exit, the file, since unedited since last write (nevermind that last write was NOT to the file) was not save and the original buffer (empty file) was sent to the recipient. telling them to not use ZZ solved the bug. -- Lance R. Bailey Systems Manager box: Robarts Research Institute email: lrb@rri.uwo.ca Clinical Trials Resources Group fax: 519.663.3789 P.O. Box 5015, 100 Perth Dr. vox: 519.663.3787 ext. 4108 London, Canada N6A 5K8