Skip to content

Instantly share code, notes, and snippets.

@foru17
Created November 24, 2015 11:04
Show Gist options
  • Save foru17/f3416ca1b19d122752ee to your computer and use it in GitHub Desktop.
Save foru17/f3416ca1b19d122752ee to your computer and use it in GitHub Desktop.
脚本批量改名 替换参数
#当前文件夹
for file in ACDC*.xxx; do
mv "$file" "${file//ACDC/AC-DC}"
done
#子目录
find . -type f -name "ACDC*" -print0 | while read -r -d '' file; do
mv "$file" "${file//ACDC/AC-DC}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment