Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Trouble with zmv and extended globs
- X-seq: zsh-users 9522
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: Trouble with zmv and extended globs
- Date: Wed, 19 Oct 2005 06:25:15 +0000
- In-reply-to: <200510181927.25831.dan.zsh@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200510181927.25831.dan.zsh@xxxxxxxxxx>
On Oct 18, 7:27pm, Dan Bullok wrote:
} varying depths, I try:
} zmv -n '(**/con*)(#qe,file ${REPLY}|grep "python script",)' '$1.py'
} which gives me the following error:
} zmv:238: bad pattern: (*/*)(#qe,file ${REPLY}|grep python,)
Philippe's answer was almost the correct one.
** is not a shortcut for (*/)#. **/ is a shortcut for (*/)#. The slash
must be there, and must immediately follow the two stars, and there must
not be anything but a slash [or open paren] preceding the two stars, or
they do not have special meaning (and are the same as one star).
In fact, Philippe's second example should work:
zmv -n '(*/)#(con*)(#qe,file ${REPLY}|grep "python script",)' '$1$2.py'
As should:
zmv -n '(**/)(con*)(#qe,file $REPLY | grep "python script",)' '$1$2.py'
You might want to use "grep -q", though.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author