Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: POSIX conformance in coreutils
- X-seq: zsh-workers 20859
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: POSIX conformance in coreutils
- Date: Wed, 23 Feb 2005 17:36:03 +0100
- In-reply-to: <200501121558.j0CFwgeq026991@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <m3r7kr31g9.fsf@xxxxxxxxxxxx> <200501121027.j0CAR12W018808@xxxxxxxxxxxxxx> <m33bx6wwzx.fsf@xxxxxxxxxxxx> <200501121558.j0CFwgeq026991@xxxxxxxxxxxxxx>
On 12 Jan, Peter wrote:
> Vin Shelton wrote:
> > I checked and I do not have POSIXLY_CORRECT set. Here's what the
> > 'Standards conformance' section of the coreutils info says:
>
> It doesn't look like we can expect much sense, then.
>
> Here is a more heavyweight change.
> + if [[ -z $TAIL_SUPPORTS_MINUS_N ]]; then
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).
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author