[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] editing variables in bash (or shell)
- Subject: [ale] editing variables in bash (or shell)
- From: esoteric at 3times25.net (Geoffrey)
- Date: Thu Mar 10 18:57:12 2005
- In-reply-to: <[email protected]>
- References: <[email protected]>
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