Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: exec 3< in interactive shell
- X-seq: zsh-users 11066
- From: Peter Stephenson <pws@xxxxxxx>
- To: Zsh users list <zsh-users@xxxxxxxxxx>
- Subject: Re: exec 3< in interactive shell
- Date: Fri, 08 Dec 2006 10:18:50 +0000
- In-reply-to: <D6F9B3AA-AA93-4506-A0FA-04576C333A15@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <D6F9B3AA-AA93-4506-A0FA-04576C333A15@xxxxxxx>
Boyd Adamson wrote:
> Is there some reason that exec 3< somefile fails in an intereactive
> shell, while working in a script?
Some systems open additional file descriptors in that area for their own
purposes: some versions of Solaris, for example. zsh keeps explicitly
opened private file descriptors at 10 or above, but there may be things
it doesn't no about.
If you have it, lsof should give you some clue what the file descriptor
is for.
> I often find myself trying to demo the ability to open file
> descriptors, but I have to keep remembering to leave zsh to do it.
> The horror!
Maybe you know, but the latest shell allows
% exec {fd}<somefile
% echo $fd
12
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
Messages sorted by:
Reverse Date,
Date,
Thread,
Author