--- Begin Message ---
2011-09-25, 15:32(+07), Ivan Shmakov:
[...]
>       (I hereafter assume that filenames do not contain any special
>       codes, such as ASCII LF, or Line Feed, or 10.)
>
[...]

Or backslashes, or trailing blanks.

> $ (while read f ; do \
>        mv -vi -- /mnt/deer/zebra/"$f" /mnt/deer/"$f" ; \
>    done) < /tmp/deer.list 
[...]

Also note that mv with -i might read from its standard input, so
you may prefer:

ret=0
while IFS= read <&3 -r f; do
  mv -vi -- "/mnt/deer/zebra/$f" "/mnt/deer/$f" || ret=$?
done 3< /tmp/deer.list
(exit "$ret")

See also xargs(1) to avoid having to use a shell loop.

-- 
Stephane


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/86ipogj44o....@gray.siamics.net


--- End Message ---

Reply via email to