I'm trying to write a script that asks the user if they are sure they want to move a file to a certain directory. The script needs to check if the file already exists in the target directory and if it so, then asks the user if they want to overwrite the existing file with the one they are trying to move.
How should the file test in my if statement look? At the moment I have
if [[ -e /targetdirectory ]] ; then........
but that doesn't seem to be the right solution?