#!/bin/bash - if [ ! $# = 2 ] ; then echo "usage: $0 target destination" 1>&2 exit 1 fi #---------------------------------------- # If the target is a directory, move the # file there, and the RCS file into the # appropriate RCS directory. if [ -d $2 ]; then mv $1 $2 if [ ! -d $2/RCS ]; then mkdir $2/RCS fi mv RCS/$1,v $2/RCS else #------------------------------------ # Rename the file and its RCS history mv $1 $2 mv RCS/$1,v RCS/$2,v fi exit 0