[ale] editing variables in bash (or shell)
Geoffrey
esoteric at 3times25.net
Thu Mar 10 19:19:29 EST 2005
Geoffrey 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
Oops, remove the 'print' before the 'cp'... that's my test script...
--
Until later, Geoffrey
More information about the Ale
mailing list