#!/bin/bash
exch_name() {
/bin/mv $1 /tmp/tmp
/bin/mv $2 $1
/bin/mv /tmp/tmp $2
}

exch_name file1 file2