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

ddj Permalink
January 22, 2013, 23:32

Was interested in your "exec 2> file" example, because of what it does to the prompt. I found out about this when I redirected stderr on a script that contained a "read". Uncomment the redirection on the read and it'll work.

# snippet:
# Run test script: ./b 1>report 2>errors

while [[ $userReply != [yY] ]]; do
read -rep "Continue [y/n]? " -i'n' userReply # 2>/dev/tty

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

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

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