From owner-freebsd-questions Mon Dec 20 12:59: 8 1999 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 2A444152D8 for ; Mon, 20 Dec 1999 12:59:04 -0800 (PST) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=ben) by scientia.demon.co.uk with smtp (Exim 3.092 #1) id 1209HM-0000MJ-00; Mon, 20 Dec 1999 20:19:36 +0000 Date: Mon, 20 Dec 1999 20:19:36 +0000 From: Ben Smithurst To: Dan Larsson Cc: "[FreeBSD-Questions-List] (E-post)" Subject: Re: press any key to continue in sh Message-ID: <19991220201936.B1558@strontium.scientia.demon.co.uk> References: <01BF4B21.FD8A5A90.dl@tyfon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <01BF4B21.FD8A5A90.dl@tyfon.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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");' that will work in FreeBSD, but I don't know about other OSes which might behave differently. It would probably be safer to do a simple "press enter to continue" prompt: echo "Press enter to continue..." read junk -- Ben Smithurst | PGP: 0x99392F7D ben@scientia.demon.co.uk | key available from keyservers and | ben+pgp@scientia.demon.co.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message