rename files using shell scripting

Hi all,

i want to rename some files in my directory
using korn shell scripting.

1) i want to rename files who have no extension so that they
will have the format: filename.extension

and

2) i want the files who has extension initially, to stay the same
(they will not be changed)

do you have any idea about how to do this using ksh scripting?
(without using sed or awk)

with regards

$ cd where you want
$ find -maxdepth 1 -type f -regex "^.*/[^\.]*$" -exec mv {} {}.extension \;

thank you very much
but i still need the ksh solution,
because i also want to do some operation on the files
other than renaming them.
i want to pass the "filenames with no extension" to a ksh variable
do some operation (including rename)

for example:
i have code to process files which have format like: filename.ext

for file in *.ext; do
#some commands
done

but i want to modify the code lines above as to
process files which have no extension (format like: filename ), while the files which have name format like filename.ext will not be affected

You can use
for file in `find ...` (without -exec)

But you'll have problems with files with spaces, see http://www.unix.com/showthread.php?t=28876

#!/bin/sh

find -maxdepth 1 -type f -regex "^.*/[^\.]*$" | while IFS= read vo
do
mv "$vo" "$vo".ext
other commands
done

Try #!/bin/ksh