Date: Mon, 20 Dec 1999 20:19:36 +0000 From: Ben Smithurst <ben@scientia.demon.co.uk> To: Dan Larsson <dl@tyfon.net> Cc: "[FreeBSD-Questions-List] (E-post)" <freebsd-questions@freebsd.org> Subject: Re: press any key to continue in sh Message-ID: <19991220201936.B1558@strontium.scientia.demon.co.uk> In-Reply-To: <01BF4B21.FD8A5A90.dl@tyfon.net> References: <01BF4B21.FD8A5A90.dl@tyfon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991220201936.B1558>