From owner-freebsd-questions Fri Aug 9 8:42:19 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3F7637B400 for ; Fri, 9 Aug 2002 08:42:16 -0700 (PDT) Received: from bodb.mc.mpls.visi.com (bodb.mc.mpls.visi.com [208.42.156.104]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DC7043E6E for ; Fri, 9 Aug 2002 08:42:16 -0700 (PDT) (envelope-from hawkeyd@visi.com) Received: from sheol.localdomain (hawkeyd-fw.dsl.visi.com [208.42.101.193]) by bodb.mc.mpls.visi.com (Postfix) with ESMTP id 17B464987; Fri, 9 Aug 2002 10:42:10 -0500 (CDT) Received: (from hawkeyd@localhost) by sheol.localdomain (8.11.6/8.11.6) id g79Fg9Z50639; Fri, 9 Aug 2002 10:42:09 -0500 (CDT) (envelope-from hawkeyd) Date: Fri, 9 Aug 2002 10:42:09 -0500 From: D J Hawkey Jr To: Christian Weisgerber Cc: questions at FreeBSD Subject: Re: sh(1) equivalent to bash(1)'s $HOME/.bash_logout? Message-ID: <20020809104209.A50604@sheol.localdomain> Reply-To: hawkeyd@visi.com References: <20020809071825.A48980@sheol.localdomain> <200208091422.g79EMHGC093218@kemoauc.mips.inka.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200208091422.g79EMHGC093218@kemoauc.mips.inka.de>; from naddy@mips.inka.de on Fri, Aug 09, 2002 at 04:22:17PM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Aug 09, at 04:22 PM, Christian Weisgerber wrote: > > D J Hawkey Jr wrote: > > > is there a sh(1) equivalent to bash(1)'s $HOME/.bash_logout? > > No, but you set a trap to be executed on exit. > > | func() > | { > | : do something > | } > | > | trap func 0 Hey, this is a neat thought. But for login/interactive shells, where would I put it? $HOME/.profile doesn't seem right. > Christian "naddy" Weisgerber Dave -- ______________________ ______________________ \__________________ \ D. J. HAWKEY JR. / __________________/ \________________/\ hawkeyd@visi.com /\________________/ http://www.visi.com/~hawkeyd/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message