bash - Shell logout after exec redirection for stdin -


as described in advanced bash script-guide, exec can used redirect i/o. write cases in shell. redirecting stdout or stderr works well, redirecting stdin makes shell logout. explanation?

commands:

exec < file 

the shell exits when reaches eof on standard input (that's why type control-d logout). when has finished reading file, exit there no more input come.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -