move only if file exists in a shell script
This one liner returns successfully even if the file is not found:
[ ! -f src ] || mv src dest
One-liner:
[ -f old ] && mv old nu
This one liner returns successfully even if the file is not found:
[ ! -f src ] || mv src dest
One-liner:
[ -f old ] && mv old nu