From owner-freebsd-questions Tue Apr 25 7: 5:31 2000 Delivered-To: freebsd-questions@freebsd.org Received: from supai.oit.umass.edu (mailhub.oit.umass.edu [128.119.175.6]) by hub.freebsd.org (Postfix) with ESMTP id CCA5937BD49 for ; Tue, 25 Apr 2000 07:05:28 -0700 (PDT) (envelope-from gpav@som.umass.edu) Received: from CONVERSION-DAEMON by supai.oit.umass.edu (PMDF V5.2-32 #38130) id <0FTK00K01SEW24@supai.oit.umass.edu> for freebsd-questions@freebsd.org; Tue, 25 Apr 2000 10:04:08 -0400 (EDT) Received: from yolen.oit.umass.edu (yolen.oit.umass.edu [128.119.166.35]) by supai.oit.umass.edu (PMDF V5.2-32 #38130) with ESMTP id <0FTK00J6ASEWK0@supai.oit.umass.edu> for freebsd-questions@freebsd.org; Tue, 25 Apr 2000 10:04:08 -0400 (EDT) Received: from localhost (gp@localhost) by yolen.oit.umass.edu (8.9.3/8.9.3) with ESMTP id KAA11605 for ; Tue, 25 Apr 2000 10:04:57 -0400 (EDT) Date: Tue, 25 Apr 2000 10:04:57 -0400 (EDT) From: Greg Pavelcak Subject: Making sh script pause for input X-Sender: gp@yolen.oit.umass.edu To: freebsd-questions@freebsd.org Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT X-Authentication-warning: yolen.oit.umass.edu: gp owned process doing -bs Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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: #!/bin/sh while read LOGNUM CLASS LNAME FNAME GPA MAJOR ; do echo $FNAME $LNAME ; echo -n "Status? " ; read STATUS ; echo "$LOGNUM $CLASS $LNAME $FNAME $GPA $MAJOR $STATUS" >> newfile ; done < contractsS00 but this just goes through the whole file echoing stuff. How do I make it wait for me to type in a value for STATUS. I'm sure I'm going to discover that the answer is in man sh, but I haven't found it yet, and I'd like to get the script going to make an unpleasant task easier. Thanks in advance for pointers. Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message