Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

multi-digit file descriptors



Contrary to bash and mksh, zsh doesn't support file descriptors with
multiple digits. Considered the following file "redir".

----------------------------------------
( echo foo >&9; ) 9>my_file
cat my_file

( echo bar >&10; ) 10>my_file
cat my_file
----------------------------------------

xvii% bash redir
foo
bar
xvii% mksh redir
foo
bar
xvii% zsh redir
foo
redir:4: parse error near `10'

The behavior of dash and ksh93 is similar to zsh. But is there any
reason?

BTW, POSIX doesn't seem to restrict file descriptors to 1 digit.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author