Date: Thu, 13 Oct 2005 20:43:02 -0500 From: Kirk Strauser <kirk@strauser.com> To: freebsd-questions@freebsd.org Subject: Re: sh Scripting - String Manipulation Message-ID: <200510132043.06169.kirk@strauser.com> In-Reply-To: <434EE80D.2010103@mykitchentable.net> References: <434EE80D.2010103@mykitchentable.net>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Thursday 13 October 2005 06:04 pm, Drew Tomlinson wrote:
> What I'd like to is get '-exec' to run this command:
>
> ln -s "/multimedia/Pictures/2005 Kimberly & Rich/IMG_1210.JPG" "2005
> Kimberly & Rich/IMG_1210.JPG"
The easiest way I've found is to simply change into /multimedia/Pictures
before running find, then refer "ln" back to your original directory.
Say that you want the links to be made inside /home/drew . Instead of running
find from their, do:
$ cd /multimedia/Pictures
$ find -iname '*.jpg' -exec ln -s {} /home/drew
There - you've removed any need for string manipulation with a simple cd.
--
Kirk Strauser
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)
iD8DBQBDTw0q5sRg+Y0CpvERAv8HAJ0XXR8ICTRWElLaPVyousBcw6dZqgCghUdj
cde0UOUME+36SlRAW6XtUD8=
=SlIu
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510132043.06169.kirk>
