I'm working on a script that reads a directory using 'find' and its '-exec' primary to create a symlink to the file. So for example, I have the following command:

find /multimedia/Pictures -iname "*.jpg" -print

This command returns a bunch of filenames.  Here's an example of one:

/multimedia/Pictures/2005 Kimberly & Rich/IMG_1210.JPG

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"

What is the best way to manipulate this string? And then what is the right syntax for -exec? I'm an extreme newbie when it comes to shell scripting. Will this work? Are the better ways to do this than using "find".

Thanks for your help,

Drew

--
Visit The Alchemist's Warehouse
Magic Tricks, DVDs, Videos, Books, & More!

http://www.alchemistswarehouse.com

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to