Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!att!cbnewsm!lfd From: lfd@cbnewsm.att.com (leland.f.derbenwick) Newsgroups: comp.bugs.sys5 Subject: Re: Obscure Vi bug? Summary: non-zero status from vi Message-ID: <1990Jul20.214800.16524@cbnewsm.att.com> Date: 20 Jul 90 21:48:00 GMT References: <798@intelhf.hf.intel.com> <462@hitachi.uucp> Organization: AT&T Bell Laboratories Lines: 20 In article <462@hitachi.uucp>, jon@hitachi.uucp (Jon Ryshpan) writes: > [ ... ] Vi is Version > SVR3.1. Also vi also often returns a nonzero status, despite the fact > that nothing seems to have gone wrong. Some versions of vi [I don't know exactly which ones, but they include the one on cbnewsm :-( ] apparently count failed searches and 'f', 't', etc., commands that you issued. For example, if you edit a file, do three searches that return "Pattern not found", then exit, vi will have a return code of 3. For my own sanity, I have a shell called "vi" in my bin that runs the /usr/bin/vi and then does an exit 0. That way I don't get "couldn't run editor" messages when I try to post something like this. -- Speaking strictly for myself, -- Lee Derbenwick, AT&T Bell Laboratories, Warren, NJ -- lfd@cbnewsm.ATT.COM or !att!cbnewsm!lfd