Subj : Re: bash script To : comp.programming From : Phlip Date : Wed Sep 14 2005 09:38 am Christian Christmann wrote: > I need a bash script which copy all files of a directory > and adds a specific prefix with all newly created > files. > E.g. in the directory I have: > > char01, char02 and chartest04 > > and want the script to create automatically > > uchar01, uchar02 and uchartest04 > > with 'u' as prefix. > > Since I'm not familiar with writing scripts I would appreciate > your help. find . -name char\* -exec cp {} new_folder/u{} \; Warning: I just put a live firecracker in your hands. Use with caution! Look up the 'find' and 'cp' commands before using that. And note the documentation for the find command won't assume BASH, so it can't mention the two critical \ marks to escape the * and ;. Then, the documentation for BASH won't assume 'find', so you generally have to pick this stuff up from forums. This is why Linux is so popular. ;-) -- Phlip http://www.greencheese.org/ZeekLand <-- NOT a blog!!! .