With fileutils-4.1, mv -i exits nonzero if any response to a prompt
is negative. I want to change it to be more in line with my reading
of POSIX (and coincidentally with the behavior of several vendor-supplied
versions of mv :-). That will also make it consistent with the way
cp's -i option works.
With fileutils-4.1:
$ touch a b;echo n|/bin/mv -i a b; echo $?; echo
/bin/mv: overwrite `b', overriding mode 0444? 1
With the proposed change:
$ touch a b;echo n|./mv -i a b; echo $?; echo
./mv: overwrite `b', overriding mode 0444? 0
Does anyone know of a reason not to do make that change?
-----------------
This is the ambiguous part of the POSIX spec:
EXIT STATUS
The following exit values shall be returned:
0 All input files were moved successfully.
>0 An error occurred.
The exit status seems to be over-specified, because with -i and a
negative response, there is neither an error, nor have all files been moved.
Here's the description of -i:
-i Prompt for confirmation if the destination path exists.
Any previous occurrences of the -f option is ignored.
Jim
_______________________________________________
Bug-fileutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-fileutils