Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Dec 1999 19:04:06 +0000
From:      Mark Ovens <mark@ukug.uk.freebsd.org>
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:  <19991220190406.B322@marder-1>
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
On Mon, Dec 20, 1999 at 07:39:53PM +0100, Dan Larsson wrote:
> How do I best produce a 'press any key to continue' prompt in sh?
> 

Try this:

#!/bin/sh

echo Press any key to continue

read answer

echo Continued!

The only limitation is that you have to press RETURN after "any key"
(unless "any key" happens to be RETURN ;) ). I'm not sure of a way of
doing it without having to press RETURN in sh(1).

HTH

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

-- 
	"there's a long-standing bug relating to the x86 architecture
	that allows you to install Windows too  ;"
				   -Matthew D. Fuller
________________________________________________________________
      FreeBSD - The Power To Serve http://www.freebsd.org
      My Webpage http://ukug.uk.freebsd.org/~mark/
mailto:mark@ukug.uk.freebsd.org              http://www.radan.com



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?19991220190406.B322>