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

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -