> for map in $(ls *.xml); do echo "$map -> ${map%%.xml}"; done I don't know why that isn't working, but for the same thing you might try: echo "$map -> `basename $map .xml`" Hamish