From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16416 invoked by alias); 11 Feb 2015 16:26:54 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19855 Received: (qmail 14379 invoked from network); 11 Feb 2015 16:26:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no version=3.3.2 Date: Wed, 11 Feb 2015 17:26:37 +0100 From: Vincent Lefevre To: zsh-users@zsh.org Subject: multi-digit file descriptors Message-ID: <20150211162637.GA9083@xvii.vinc17.org> Mail-Followup-To: zsh-users@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6419-vl-r76280 (2015-02-10) 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 - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)