[email protected] wrote: > > I see that: > exec {n}<>&- > > is syntactically invalid in ksh and zsh. However "n" is a file > descriptor for open terminal, in ksh you can do this: > > exec {n}<&- > exec {n}>&- > > and not get an error while in zsh, you do get an error because zsh > says n is already closed. (Probably more relevant is the fact that n > is open read/write than it is a terminal.)
Erm... please do not use "exec" in cases where you may hit an error, use "redirect". "redirect" allows to test for errors without exiting the script. See http://www.opensolaris.org/os/project/shell/shellstyle/#use_redirect_not_exec_to_open_files ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [email protected] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
