Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Dec 1999 04:36:42 +0000 (GMT)
From:      Salihin <odhienx@arwana.untan.ac.id>
To:        Ben Smithurst <ben@scientia.demon.co.uk>
Cc:        Dan Larsson <dl@tyfon.net>, "[FreeBSD-Questions-List] (E-post)" <freebsd-questions@freebsd.org>
Subject:   Re: press any key to continue in sh
Message-ID:  <Pine.BSF.4.10.9912200434190.2209-100000@arwana.untan.ac.id>
In-Reply-To: <19991220201936.B1558@strontium.scientia.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 20 Dec 1999, Ben Smithurst wrote:

> Dan Larsson wrote:
> 
> > How do I best produce a 'press any key to continue' prompt in sh?
> 
> Try this:
> 
> echo "Press any key to continue..."
> perl -e 'system("stty", "cbreak"); getc(STDIN); system("stty", "-cbreak");'
> 

or...
/bin/sh -c "read -p \"Press CTRL+C to abort and ENTER to continue !\" _e"
^^^^^^
     shell :-)
-salam-



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9912200434190.2209-100000>