swapfile

NAME
        swapfiles

SYNOPSIS
        swapfiles FILE1 FILE2

DESCRIPTION
        swap filenames (FILE1 is renamed FILE2 and FILE2 is renamed FILE1)

Use case:

 $ ls
file1  file2
 $ cat file1
marry
had
a little
lamb
 $ cat file2
computational
chemistry
rocks!
 $ swapfiles file1 file2
 $ cat file1
computational
chemistry
rocks!
 $ cat file2
marry
had
a little
lamb

Commands to include in your bash script: mv, mktemp