Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
script within find
- X-seq: zsh-users 11216
- From: "Alexy Khrabrov" <deliverable@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: script within find
- Date: Fri, 23 Feb 2007 23:39:40 -0800
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=JpWkMkJ85YhveLsmx/LCOtKH3+oGWhyXXCKk6dIZny9s4Hen/UaP0coa1puVyiyOVZaXju1ZRhhWCb+S6/BL4zjkLSv0sYG3osD2b13XX6OQ7KLE40mGP+mEXC3VpwzRKw3/zklstEXmYd1MrReMNlGuEwOnN7xk2HKDM/sMKTk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ShX9Zygo6SOFow2XTTSV5IrhzmlRgXCSMwnSt5UH6iHsLkGzj+GlqzavcBEpIMFLk0+MIKb1TpfHs12P8OGgF0Gg1fvExPkYEhO6p/ktDRZ1wBUfRp41kuqL3g2hYC+R++QTD1QE5g6+xOQhtF+gSwEvCNSt4AXgRpuA551Tv3o=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Here's a mystery solving which I've avoided for a while. Now that I'm
going to publish a recipe for fixing Photoshop installation on a
case-sensitive Mac drive, I'd like to compress it into one script.
The problem is, the script contains a find command, which passes all
things it finds via -exec to a small helper script. The helper script
is necessary since it seems difficult to make -exec contain a single
in-line command to do it. Here they are:
-- the find command:
find . -name a -exec ~/bin/fix-ps-cs2.sh {} \;
-- the helper script, ~/bin/fix-ps-cs2.sh:
#!/bin/sh
DIR=`dirname $1`
(cd $DIR; ln -s a A)
as you see, it needs to invoke dirname on the argument, then create a
symlink in that dirname.
Can the helper script be avoided and all the work done within the
single find command?
Cheers,
Alexy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author