bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Veto shell exit


From: Paul Jarc
Subject: Re: Veto shell exit
Date: Mon, 03 Jun 2002 11:44:37 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu)

David Kaasen <address@hidden> wrote:
> What I want is to display a prompt (something like
> "Do you want to exit (y/n)?") letting the user
> regret, e.g. on accidental Ctl-D or "exit"s.

IGNOREEOF=2 # see man page
exit() {
  read -p 'Do you want to exit (y/n)? ' reply
  case "$reply" in [yY]*) builtin exit;; esac
}


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]