Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
multi-digit file descriptors
- X-seq: zsh-users 19855
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: multi-digit file descriptors
- Date: Wed, 11 Feb 2015 17:26:37 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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