文件名pascal转underscore

for file in ./* ; do mv "$file" "$(echo $file|sed -e 's/\([A-Z]\)/_\L\1/g' -e 's/^.\/_//')" ; done

 

 

参考:

https://askubuntu.com/questions/844738/rename-all-files-in-a-folder-from-camel-case-to-lowercase-and-put-underscore-to

 

posted @ 2020-12-14 15:17  wolbo  阅读(64)  评论(0编辑  收藏  举报