zsh-users
 help / color / mirror / code / Atom feed
* script within find
@ 2007-02-24  7:39 Alexy Khrabrov
  2007-02-24 10:08 ` Stephane Chazelas
  0 siblings, 1 reply; 12+ messages in thread
From: Alexy Khrabrov @ 2007-02-24  7:39 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-09-14 15:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-24  7:39 script within find Alexy Khrabrov
2007-02-24 10:08 ` Stephane Chazelas
2007-04-25 19:14   ` Alexy Khrabrov
2007-04-25 21:52     ` Chris Johnson
2007-04-25 21:58       ` Chris Johnson
2007-04-25 22:26         ` Alexy Khrabrov
2007-04-25 22:38           ` Matt Wozniski
2007-04-25 23:19             ` Alexy Khrabrov
2007-09-11  7:52               ` Alexy Khrabrov
2007-09-13 23:29                 ` Stephane Chazelas
2007-09-14  9:10                 ` Atom Smasher
2007-09-14 15:41                   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).