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
Post a Comment