Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: trying to match yyyy-mm-dd what am I missing?
- X-seq: zsh-users 9379
- From: Timothy Luoma <lists@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: trying to match yyyy-mm-dd what am I missing?
- Date: Sat, 3 Sep 2005 15:01:31 -0400
- In-reply-to: <slrndhj7r8.8pe.mason@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <A69FA3A4-3DC4-4D1D-BFC3-B9029D816043@xxxxxxxxxxxx> <slrndhj7r8.8pe.mason@xxxxxxxxxxxxxxxxx>
On Sep 3, 2005, at 9:04 AM, Geoff Wing wrote:
# mkdir 2005-08-24 2005-08-26 2005-08-27 2005-08-28 2005-08-29
access.log
# for i in *(/); do [[ $i == 2[0-9][0-9][0-9]-[0-9][0-9]-[0-9]
[0-9] ]] && print "$i YES" || print "$i NO"; done
2005-08-24 YES
2005-08-26 YES
2005-08-27 YES
2005-08-28 YES
2005-08-29 YES
access.log NO
Hrm... that didn't work here:
$ for i in *(/); do [[ $i == 2[0-9][0-9][0-9]-[0-9][0-9]-[0-9]
[0-9] ]] && print "$i YES" || print "$i NO"; done
2005-08-24/ NO
2005-08-26/ NO
2005-08-27/ NO
2005-08-28/ NO
2005-08-29/ NO
access.log/ NO
Messages sorted by:
Reverse Date,
Date,
Thread,
Author