From owner-freebsd-questions Sat Jun 5 15:45:28 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cygnus.rush.net (cygnus.rush.net [209.45.245.133]) by hub.freebsd.org (Postfix) with ESMTP id AC64D14D03 for ; Sat, 5 Jun 1999 15:45:25 -0700 (PDT) (envelope-from bright@rush.net) Received: from localhost (bright@localhost) by cygnus.rush.net (8.9.3/8.9.3) with SMTP id SAA03184; Sat, 5 Jun 1999 18:08:47 -0500 (EST) Date: Sat, 5 Jun 1999 18:08:45 -0500 (EST) From: Alfred Perlstein To: William Woods Cc: FreeBSD Questions Subject: Re: script questions...... In-Reply-To: <000001beaf9e$b1d87880$124b93cd@william> 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 Sat, 5 Jun 1999, William Woods wrote: > I have need for a script that will do something like this.... > > command > echo ........... > command > echo ........... > echo................. > command > echo Please insert data disk and hit any key to continue...... > > That uis where I am stumped, how do I do that last line, have the system > check for keypress and continue? check the "sh" manpage: read [ -p prompt ] [ -t timeout ] [ -e ] variable ... The prompt is printed if the -p option is specified and the stan- dard input is a terminal. Then a line is read from the standard input. The trailing newline is deleted from the line and the line is split as described in the section on word splitting above, and the pieces are assigned to the variables in order. If .... -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message