Hmmm... I found a way, but it seems kind of hokey. Anyone have a better way? for i in *.php3 ; do mv $i `ls *.php3| perl -pi -e 's/.php3/.php/g' | head -n 1` ; done Thanks to Rob for that perl search and replace trick. I just found out it works with stdio! This also assumes that the list *.php3 is the same list returned by `ls *.php3` (or atleast the first element is the same). It happened to be so for me. They were both alphabetized list. But on my workstation (another machine), I have my ls reporting 'ls -U' (sort by last access), where this situation won't always be true. Cory
