You're viewing a comment by dj and its responses.

December 09, 2013, 19:51

Cam's could also be written:

while read -r line <&3; do
# do stuff here
done 3< input_file.txt

I don't believe the explicit close is necessary.
I added lsof -c "${0##*/}" >log"${id}" in and outside the
loop and fd3 was not present after the while.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "coding_325": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.