Using 'exit' in a Bourne shell script

XMRP50000[jcm]-a.v.reed avr at mtgzz.UUCP
Tue Feb 2 04:22:39 AEST 1988


In article <169 at mccc.UUCP>, pjh at mccc.UUCP (Peter J. Holsberg) writes:
> I would like to have my users logout via a shell script "off" rather
> than with ^d.

Any sh script can kill its parent shell (in your case, the login shell)
with

kill -1 `ps -f -p $$|grep $$|cut -c16-20`

This assumes the System V ps spec, but could be adapted to any
UNIX(tm) system and any version of /bin/sh.

					Adam Reed (mtgzz!avr)



More information about the Comp.sys.att mailing list