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 -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -