Re: [SLUG] Scripting Question

From: Russ Wright (rwrigh10@tampabay.rr.com)
Date: Wed Aug 30 2006 - 15:10:47 EDT


On Tue, 2006-08-29 at 09:52 -0400, Eben King wrote:

> Can you assume that the files in /home/something/public_html/ have no spaces
> or other nasty characters? Probably not, but if so it's easy:
>
> for file in `find /home/something/public_html/` ; do
> ln -s $file /var/codebase/$file
> done
>
> If you want to trim off stuff from the beginning of $file bash's ${foo#bar}
> construct comes in handy.
>
> If $file might contain special chars, it gets more complicated.
>
> find /home/something/public_html/ | while read file ; do
> ln -s "$file" "/var/codebase/$file"
> done
>
> maybe?
>

Eben

I'll give this a try and let you know.

Russ

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:18:45 EDT