Doesn't recognize the mv command

I'm nearly finished my program i've got everything in place and than when i run it it comes back with the reply mv: command not found. This is the code that seems to be causing the problem.
elif [ $NUM -eq 2 ]
then
echo "There are more than one '$1' files in the system."
echo "Please select from the options below"
echo "1) Deleted from:$PathVar1 Deleted at $TimeVar1 on $DateVar1"
echo "2) Deleted from:$PathVar2 Deleted at $TimeVar2 on $DateVar2"
echo "3) Exit"
echo "Please enter the number of the file that you wish to restore"
read ANSWER
case $ANSWER in
1) mv $1 $PathVar1;;
2) mv $1 $PathVar2;;
3) exit;;
esac
But i can't see anything wrong with it. Why does the cpu not recognize the mv command. Has anyone else experienced this, Please let me know.

Zoolz,

My guess is that there is an issue with your $ANSWER variable, unless you have specifically typecasted the $ANSWER variable, shell is going to read the variable as a string value rather than a integer value. Hence change your script as follows.

case "$ANSWER" in 
"1") mv $1 $PathVar1;;
"2") mv $1 $PathVar2;;
"3") exit;;
esac

Jerardfjay

Try to maintain mv as /usr/sbin/mv and then try .

Also check the same mv command with whereis mv command.