Skip to content

Instantly share code, notes, and snippets.

@tsaito-cyber
Created February 11, 2020 07:13
Show Gist options
  • Save tsaito-cyber/5d92e992e1c5df738dbaae7fb673d33e to your computer and use it in GitHub Desktop.
Save tsaito-cyber/5d92e992e1c5df738dbaae7fb673d33e to your computer and use it in GitHub Desktop.
convert_filename.sh
#!/bin/bash -e
# 日本語重複問題対応スクリプト
find . -type f |
while read src;
do
dist="$(echo $src | nkf -w --ic=utf8-mac -)"
if [[ "$dist" != "$src" ]]; then
echo mv "$src" "$dist"
fi
done | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment