From owner-freebsd-questions Mon Dec 20 13:34:15 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mx2.itb.ac.id (mx2.itb.ac.id [202.249.47.37]) by hub.freebsd.org (Postfix) with SMTP id 32D70152DB for ; Mon, 20 Dec 1999 13:34:09 -0800 (PST) (envelope-from odhienx@arwana.untan.ac.id) Received: (qmail 21389 invoked by uid 1003); 20 Dec 1999 21:33:25 -0000 Received: from unknown (HELO arwana.untan.ac.id) (167.205.153.134) by mx2.itb.ac.id with SMTP; 20 Dec 1999 21:33:25 -0000 Received: (qmail 2245 invoked by uid 1003); 20 Dec 1999 04:36:42 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 20 Dec 1999 04:36:42 -0000 Date: Mon, 20 Dec 1999 04:36:42 +0000 (GMT) From: Salihin To: Ben Smithurst Cc: Dan Larsson , "[FreeBSD-Questions-List] (E-post)" Subject: Re: press any key to continue in sh In-Reply-To: <19991220201936.B1558@strontium.scientia.demon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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