Xref: utzoo comp.sys.att:2286 comp.unix.questions:5315 Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!udel!princeton!mccc!pjh From: pjh@mccc.UUCP (Peter J. Holsberg) Newsgroups: comp.sys.att,comp.unix.questions Subject: Using 'exit' in a Bourne shell script Message-ID: <169@mccc.UUCP> Date: 29 Jan 88 21:41:48 GMT Organization: Mercer Co. Comm. College, Trenton, NJ Lines: 22 I would like to have my users logout via a shell script "off" rather than with ^d. The script I wrote is very simple, but 'exit' has no effect. echo "OFF \c:" >> /usr/.logins who am i >> /usr/.logins exit The correct entries appear in /usr/.logins, but 'exit' seems to be ignored. Typing 'exit' at the prompt does in fact do what I want -- i.e., act as a substitute for ^d. I see that exit(2) is a system call that terminates the calling process. Oh oh! It terminates 'off' but doesn't log the user off! Rats!@!@#$% Can anyone suggest a way (SysVr3.0) to do what I want? Thanks. . -- Peter Holsberg UUCP: {rutgers!}princeton!mccc!pjh Technology Division CompuServe: 70240,334 Mercer College GEnie: PJHOLSBERG Trenton, NJ 08690 Voice: 1-609-586-4800