From owner-freebsd-questions Tue Apr 25 10:37:42 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 827C937BDA0 for ; Tue, 25 Apr 2000 10:37:39 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e3PI6ga13299; Tue, 25 Apr 2000 11:06:42 -0700 (PDT) Date: Tue, 25 Apr 2000 11:06:42 -0700 From: Alfred Perlstein To: Doug Barton Cc: Greg Pavelcak , freebsd-questions@FreeBSD.ORG Subject: Re: Making sh script pause for input Message-ID: <20000425110642.D9754@fw.wintelcom.net> References: <3905CE1F.CAD4A911@gorean.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <3905CE1F.CAD4A911@gorean.org>; from Doug@gorean.org on Tue, Apr 25, 2000 at 09:55:59AM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Doug Barton [000425 11:01] wrote: > Greg Pavelcak wrote: > > > > This is driving me nuts. I want a script that prompts with a > > student's name and then waits for input regarding that student > > then moves on. I've tried using xargs and a script like this: > > The bad news, you can't do that with sh because once you tell it to > take its input from a file that's where it's going to take all of its > input from. The good news, this is a really easy perl script, and this > kind of processing is one of the things perl is really good for. Actually... :) http://www.complete.org/mailinglists/archives/aclug-l-199811/msg00018.html explains some really nifty things you can do with sh and filehandles. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message