First of all - Is this homework? Read Rule #6. Because this smells like homework, I will not provide the solution but I will say that you are on the right track.
You dont really need the menu. But if you choose to use one, try the builtin
select case command. It will create the menu for you. Also, the way that you have your choices doesnt really make sense. Think about the copy command (see
man cp)and the arguments it takes. In its simplest form, it takes 2 file names. The first being the path and file to copy and the second being the path and new file name. Given that, your script could simply be:
TARGET="/path/to/file/file-to-copy "
DESTINATION="/path/to/copy/file/new-file-name "
cp $TARGET $DESTINATION
Think about what your program flow will be. If you do, you will have a much easier time of programming it. (By the way, what class is this assignment for?
)
Begin Script
-Prompt User to Enter A File Name To Copy
-Verify File Entered Exists
-----Prompt User to Re-enter if File does not exist
-Enter New Filename
-perform the copy
-End Script