zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk
Subject: Re: POSIX conformance in coreutils
Date: Wed, 23 Feb 2005 18:24:02 +0000	[thread overview]
Message-ID: <2940.1109183042@csr.com> (raw)
In-Reply-To: Message from Oliver Kiddle <okiddle@yahoo.co.uk>  of "Wed, 23 Feb 2005 17:36:03 +0100." <22172.1109176563@trentino.logica.co.uk>

Oliver Kiddle wrote:
> Would it perhaps be easier to just use something like this:
> 
>   tail() {
>     local arr
>     arr=( ${(f)"$(</dev/fd/0)"} )
>     print -lr -- $arr[${1:--10},-1]
>   }
> 
> It's shorter and potentially tests other zsh features as a side-effect
> (such as emulating /dev/fd in redirections).

I don't think /dev/fd is currently faked to that extent.  There's
special handling for tests, and /dev/fd is sometimes used to *implement*
process substitution, but it won't handle it specially there.  You could
build up arr some other way, of course.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


  parent reply	other threads:[~2005-02-23 18:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-12  1:01 Vin Shelton
2005-01-12  9:18 ` Stephane Chazelas
2005-01-12 16:12   ` POSIX conformance in Solaris Danek Duvall
2005-01-12 10:27 ` POSIX conformance in coreutils Peter Stephenson
2005-01-12 10:42   ` Stephane Chazelas
2005-01-12 14:19   ` Vin Shelton
2005-01-12 15:58     ` Peter Stephenson
2005-02-23 16:36       ` Oliver Kiddle
     [not found]         ` <okiddle@yahoo.co.uk>
2005-02-23 18:24           ` Peter Stephenson [this message]
2005-01-12 16:18     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2940.1109183042@csr.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).