#!/bin/sh
# Script: renames a file -- Bourne shell

#Next two lines should do same thing
if [ $# -lt 2 ]     # Argument checking
#if test $# -lt 2    # Argument checking
then
	echo "Usage: $0 file1 file2 " 1>&2
	exit 1
fi
#Next two lines should do same thing
if [ -f $1 ]        # Check for file existence
#if test -f $1       # Check for file existence
then
	mv $1 $2        # Rename file1
	echo $1 has been renamed to $2
else
	echo "$1 doesn't exist"
	exit 2
fi
