From owner-freebsd-questions@FreeBSD.ORG Fri Oct 14 01:43:10 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E7D916A41F for ; Fri, 14 Oct 2005 01:43:10 +0000 (GMT) (envelope-from kirk@strauser.com) Received: from kanga.honeypot.net (kanga.honeypot.net [208.162.254.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id B722543D46 for ; Fri, 14 Oct 2005 01:43:09 +0000 (GMT) (envelope-from kirk@strauser.com) Received: from localhost (localhost [127.0.0.1]) by kanga.honeypot.net (Postfix) with ESMTP id 685CB22240B for ; Thu, 13 Oct 2005 20:43:08 -0500 (CDT) Received: from kanga.honeypot.net ([127.0.0.1]) by localhost (kanga.honeypot.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 58796-05 for ; Thu, 13 Oct 2005 20:43:07 -0500 (CDT) Received: from kanga.honeypot.net (unknown [IPv6:2001:470:1f01:224:1::2]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by kanga.honeypot.net (Postfix) with ESMTP id 81F7A21F9D8 for ; Thu, 13 Oct 2005 20:43:07 -0500 (CDT) From: Kirk Strauser To: freebsd-questions@freebsd.org Date: Thu, 13 Oct 2005 20:43:02 -0500 User-Agent: KMail/1.8.2 References: <434EE80D.2010103@mykitchentable.net> In-Reply-To: <434EE80D.2010103@mykitchentable.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1650692.JqiNb8un7X"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510132043.06169.kirk@strauser.com> X-Virus-Scanned: amavisd-new at honeypot.net Subject: Re: sh Scripting - String Manipulation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2005 01:43:10 -0000 --nextPart1650692.JqiNb8un7X Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=20 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 runn= ing=20 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. =2D-=20 Kirk Strauser --nextPart1650692.JqiNb8un7X Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDTw0q5sRg+Y0CpvERAv8HAJ0XXR8ICTRWElLaPVyousBcw6dZqgCghUdj cde0UOUME+36SlRAW6XtUD8= =SlIu -----END PGP SIGNATURE----- --nextPart1650692.JqiNb8un7X--