Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: script within find
- X-seq: zsh-users 11452
- From: "Alexy Khrabrov" <deliverable@xxxxxxxxx>
- To: "Matt Wozniski" <godlygeek@xxxxxxxxx>
- Subject: Re: script within find
- Date: Wed, 25 Apr 2007 16:19:55 -0700
- Cc: zsh-users@xxxxxxxxxx
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Q7AnGc0YIsR4k3V0QKd1geOE7v6gM9fvTyqQJQ5UXvP2u5WQZKTP5k1ntBQU+wNXxmyv+vAHBTrR9WT/U5dAHtSfRJ7u1FMaZ4rDFY8zXgjwr3kVJ/gTfasqpAm1FSkaY8aWDoAhQZZDKLYS0UfmnzeXKdsMTPTh38m+hX3N0d4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XnCn7r3tDsEYfYzgYyfug8gPZHTs2SKpkjHjGEp8/7pSCDOqACUTIXpupX0rrTcDgmSk+mZ1fJ2jnr2KWo7tKRcPIxdk0Pa+KRjkOinxUYLCvqu6bNELtJQ5AZi+OnpOOZp/dfEUsKN+4Nqme8ukyjamewPclRlTjuY7SzB2bQ4=
- In-reply-to: <17393e3e0704251538h10a32ff4xff95bb875d8ed193@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <7c737f300702232339keaffa58g99b1f51de74e0c8a@xxxxxxxxxxxxxx> <20070224100809.GA4828@xxxxxxxxxxxxxxx> <7c737f300704251214r602027a4u2d3533370fd317a9@xxxxxxxxxxxxxx> <20070425215214.GA8900@xxxxxxxxxxxxxxxxx> <20070425215843.GB8900@xxxxxxxxxxxxxxxxx> <7c737f300704251526m48df5c7dk6d32b340547e012d@xxxxxxxxxxxxxx> <17393e3e0704251538h10a32ff4xff95bb875d8ed193@xxxxxxxxxxxxxx>
On 4/25/07, Matt Wozniski <godlygeek@xxxxxxxxx> wrote:
If I'm understanding your question correctly, you want to create a
copy of ./tifs called ./jpgs, and have the copy only contain
directories, no files. Is that correct?
Yes.
If so, the following should tackle it:
for dir in tifs/**/*(/)
mkdir -p ${dir/tifs/jpgs}
I'm sure that there's a better way to do this that only requires an
"mkdir -p" on each leaf directory, but I can't think of it at the
moment and this should do what you want, if a bit inefficiently.
Cool, and nice use of zsh features already! This is an artistic
question -- I've been doing different things to mirror a directory
structure only (without files yet), and zsh seems to have some power
features which make it simpler.
Cheers,
Alexy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author