[ale] editing variables in bash (or shell)
Greg Freemyer
greg.freemyer at gmail.com
Thu Mar 10 19:41:48 EST 2005
Too late, my script is running.
Also, your script assumes the output of find wont overflow a list.
I assume that is a problem?
I did:
find .... > /tmp/files
cat /tmp/files | while read orig_path
do
...
done
Isn't that safer than your approach?
Greg
On Thu, 10 Mar 2005 18:50:48 -0500, Geoffrey <esoteric at 3times25.net> wrote:
> Greg Freemyer wrote:
>
> > To do that, I need to create a variable dest_file_name that takes the
> > '/' and replaces them with '-' chars. I know you can do that in the
> > shell, but I've forgotten how.
>
> How about a single for script to do it all?
>
> Set DIR and PATTERN appropriately...
>
> for fn in $(find DIR -name PATTERN -print); do
> print cp $fn $(echo $fn|tr '/' '-')
> done
>
> --
> Until later, Geoffrey
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
More information about the Ale
mailing list