move only if file exists in a shell script

Solution 1:

One-liner:

[ -f old ] && mv old nu

Solution 2:

You should test if the file exists

if [ -f blah ]; then
   mv blah destination
fi