When trying to convert some files to lower case I noticed something which seems strange to me.
When executing this in bash:
find . -iname 'test' | while IFS='n' read item; do mv $item $(echo $item | tr [:upper:] [:lower:]); done
And the source and target are unchanged for mv, I get the following error:
mv: caot move '.test' to a subdirectory of itself, './test/test'
Where does the './test/test' come from? When echoing instead of executing mv, I get 'mv ./test ./test'. I tested this both on FreeBSD 10 and Debian 8.2.0 with the same results. What am I missing?
برچسب:
نویسنده: استخدام کار