Hi

I need some help with scripts. I'm using the following loop:

        while read line
        do
                # manipulate file here
        
                if [ "$test" = "true" ]
                then
                        echo "Would you like to read more lines?" ; read
input
                        # process input here (continue or exit )
                fi

        done < "$filename"

The problem is that this reads ALL input from file.

How do I make this loop able to read from user as well?
The following does not work. Why?

        exec &4<"$filename"
        while read line
        do
        # ...
        done <&4

        
Ralf



 

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to