mv in a script
by Skaperen from LinuxQuestions.org on (#5GHZP)
i have a script that needs to do a few mv commands. if i use the -n option and it can't do the move, it silently quits even with -v included. it even sets the exit code to zero. but if i leave out the -n then it prompts to do an overwrite (replace) causing the script to stall there. is there a way to get a proper error message, or at least an error exit, in cases when it can't move the file?

