Why does
exec >somefile
return immediately, while
exec 2>somefile
doesn't and hang on indefinitely? Thanks.
Why does
exec >somefile
return immediately, while
exec 2>somefile
doesn't and hang on indefinitely? Thanks.
It doesn't hang. If you're running interactively, and you look inside somefile
, you'll see your prompt. STDERR is where bash writes the prompt to.