Article 5GHZP mv in a script

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?latest?d=yIl2AUoC8zA latest?i=6HJVvMMlF5A:vqUnLX23hDY:F7zBnMy latest?i=6HJVvMMlF5A:vqUnLX23hDY:V_sGLiP latest?d=qj6IDK7rITs latest?i=6HJVvMMlF5A:vqUnLX23hDY:gIN9vFw6HJVvMMlF5A
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments