Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [[ -f file* ]]
- X-seq: zsh-users 14133
- From: Matt Wozniski <godlygeek@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: [[ -f file* ]]
- Date: Mon, 18 May 2009 05:36:18 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=2oBLqn9xLG1w+1u7fcgT/BpnPj10VZ6iClwAA6W9vXY=; b=R0PmzsZ2f/XNkocXjZMupNOCndNVm0siPEFSHMuTCZ0Q9+ZBNdBFRSqFaqSs9j7V4a iCNWBhOZ80bMm4dBj8EQAE48PZVKjpaGE96YQtfobT4znYDZFM0L3W6gJLiAHdk5U+jc z5QxweduB5SQgVji9dFNK9MNlDiSCkKhU11RY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=IZy1OJUAv9/KLr/MZ2Cu7HrJsh00wfSUUWWux7H/+OP7nhRdh4kLE9BIpMbnW7nCSF RwwhIeMxG9E4aJLqfRAsO/cAPv7o2CW+m7cayD0vTQFgXTxtiZ4jS3sBoDQx17C7+aar 6Ou4tsGD8BORThBBP2lWvqH5eRXA5NnBThFuA=
- In-reply-to: <20090518091455.83279.qmail@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20090518091455.83279.qmail@xxxxxxxxxxx>
On Mon, May 18, 2009 at 5:14 AM, Atom Smasher wrote:
> if i want to test for the presence of one or more files matching a certain
> pattern, it seems non-trivial to do it with the normal "test" or conditional
> expressions.
...
> is there a better way?
Well, off the top of my head, I can think of
[ -n "$(print -- test*(N))" ]
but even that seems inelegant; I'm sure someone can chime in with
something better.
~Matt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author