On 2/8/25 10:48 AM, carlyle_moul...@optusnet.com.au wrote:

Then follows a while read REPLY; do # loop to read records from
/tmp/$USER/tempfile1
# The first record is discarded, from the remainder the File_Name is
extracted and passed to a functionas a quoted string to function
File_Contains_Blanks "$File_Name"
# Global variable GRV_File_Contains_Blanks returns true if there is at
least one blank
# Function Get_Reply is called to get a Y or N answer preceded by a
prompt using the read command
# Instead of this happening the read command in Get_Reply goes into an
infinite loop reading remaining
# records in /tmp/$USER/tempfile1 and continuing until terminated by
Ctrl - C
# obviously some data from the read in command in the main program
while read loop is contaminatng that for the read -r -p $1 command in
Get_Reply

There is only one standard input for a process, and the read builtin
reads from it (ignore the -u option for now, since you're not using it).

The `read' in GetReply reads from the same standard input stream as the
`read' in the while loop. Since you've redirected standard input from
/tmp/$USER/tempfile1, GetReply will read from it.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to