#!/bin/sh
for file in cap*
do
  new=`echo "$file" | sed s/cap/${1:-tmp}/`
  mv "$file" "$new"
# cp -p "$file" "${1:-tmp}""$file"
done
