[KLUG Members] Shell scripts

Jeremy Leonard members@kalamazoolinux.org
Mon, 24 Nov 2003 15:52:40 -0500


I want to replace test in about 200 files with a dynamicaly generated string
based on the file name. All the files are in one directory.

Bacicaly something like this:

for each file in dir

delete file
recreate file
put text in file
set owner
set permissions

I can do everything except iterate on each file.

There are more files in this dir than just the ones I want to edit.

All the files I want to edit have the same extention.

I'm doing this with a shell script so far.

Any pointers would be helpfull.

Thanks.

Jeremy Leonard