Using sed to strip apart file names:
ls -d *.foo | sed -e 's/.*/mv & &/' -e 's/foo$/bar/' | sh
- Unix – Frequently Asked Questions (2/7) (Section 2.6)
- Shell Programming Basics
- Bourne Shell Programming Tutorial
- Advanced Bash-Scripting Guide
- sed
- sed tutorial (elflord@pegasus.rutgers.edu)
- sed tutorials