ファイル名のひらがな/カタカナをターミナルで一括でアルファベットに

OS: Mac
terminal

とりあえず、これで全部対応できると思っていた。
※ターミナルにコピーで対応できる

```txt:qiita.txt
for F in が; do mv $F ${F/が/ga};done;
for F in ぎ; do mv $F ${F/ぎ/gi};done;
for F in ぐ; do mv $F ${F/ぐ/gu};done;
for F in げ; do mv $F ${F/げ/ge};done;
for F in ご; do mv $F ${F/ご/go};done;
for F in ざ; do mv $F ${F/ざ/za};done;
for F in じ; do mv $F ${F/じ/ji};done;
for F in ず; do mv $F ${F/ず/zu};done;
for F in ぜ; do mv $F ${F/ぜ/ze};done;
for F in ぞ; do mv $F ${F/ぞ/zo};done;
for F in だ; do mv $F ${F/だ/da};done;
for F in ぢ; do mv $F ${F/ぢ/ji};done;
for F in づ; do mv $F ${F/づ/zu};done;
for F in で; do mv $F ${F/で/de};done;
for F in ど; do mv $F ${F/ど/do};done;
for F in ば; do mv $F ${F/ば/ba};done;
for F in び; do mv $F ${F/び/bi};done;
for F in ぶ; do mv $F ${F/ぶ/bu};done;
for F in べ; do mv $F ${F/べ/be};done;
for F in ぼ; do mv $F ${F/ぼ/bo};done;
for F in ぱ; do mv $F ${F/ぱ/pa};done;
for F in ぴ; do mv $F ${F/ぴ/pi};done;
for F in ぷ; do mv $F ${F/ぷ/pu};done;
for F in ぺ; do mv $F ${F/ぺ/pe};done;
for F in ぽ; do mv $F ${F/ぽ/po};done;
for F in あ; do mv $F ${F/あ/a};done;
for F in い; do mv $F ${F/い/i};done;
for F in う; do mv $F ${F/う/u};done;
for F in え; do mv $F ${F/え/e};done;
for F in お; do mv $F ${F/お/o};done;
for F in か; do mv $F ${F/か/ka};done;
for F in き; do mv $F ${F/き/ki};done;
for F in く; do mv $F ${F/く/ku};done;
for F in け; do mv $F ${F/け/ke};done;
for F in こ; do mv $F ${F/こ/ko};done;
for F in さ; do mv $F ${F/さ/sa};done;
for F in し; do mv $F ${F/し/shi};done;
for F in す; do mv $F ${F/す/su};done;
for F in せ; do mv $F ${F/せ/se};done;
for F in そ; do mv $F ${F/そ/so};done;
for F in た; do mv $F ${F/た/ta};done;
for F in ち; do mv $F ${F/ち/chi};done;
for F in つ; do mv $F ${F/つ/tsu};done;
for F in て; do mv $F ${F/て/te};done;
for F in と; do mv $F ${F/と/to};done;
for F in な; do mv $F ${F/な/na};done;
for F in に; do mv $F ${F/に/ni};done;
for F in ぬ; do mv $F ${F/ぬ/nu};done;
for F in ね; do mv $F ${F/ね/ne};done;
for F in の; do mv $F ${F/の/no};done;
for F in は; do mv $F ${F/は/ha};done;
for F in ひ; do mv $F ${F/ひ/hi};done;
for F in ふ; do mv $F ${F/ふ/fu};done;
for F in へ; do mv $F ${F/へ/he};done;
for F in ほ; do mv $F ${F/ほ/ho};done;
for F in ま; do mv $F ${F/ま/ma};done;
for F in み; do mv $F ${F/み/mi};done;
for F in む; do mv $F ${F/む/mu};done;
for F in め; do mv $F ${F/め/me};done;
for F in も; do mv $F ${F/も/mo};done;
for F in や; do mv $F ${F/や/ya};done;
for F in ゆ; do mv $F ${F/ゆ/yu};done;
for F in よ; do mv $F ${F/よ/yo};done;
for F in ら; do mv $F ${F/ら/ra};done;
for F in り; do mv $F ${F/り/ri};done;
for F in る; do mv $F ${F/る/ru};done;
for F in れ; do mv $F ${F/れ/re};done;
for F in ろ; do mv $F ${F/ろ/ro};done;
for F in わ; do mv $F ${F/わ/wa};done;
for F in ゐ; do mv $F ${F/ゐ/wi};done;
for F in ゑ; do mv $F ${F/ゑ/we};done;
for F in を; do mv $F ${F/を/o};done;
for F in ん; do mv $F ${F/ん/n};done;
for F in ぁ; do mv $F ${F/ぁ/xa};done;
for F in ぃ; do mv $F ${F/ぃ/xi};done;
for F in ぅ; do mv $F ${F/ぅ/xu};done;
for F in ぇ; do mv $F ${F/ぇ/xe};done;
for F in ぉ; do mv $F ${F/ぉ/xo};done;
for F in ゃ; do mv $F ${F/ゃ/xya};done;
for F in ゅ; do mv $F ${F/ゅ/xyu};done;
for F in ょ; do mv $F ${F/ょ/xyo};done;
for F in ガ; do mv $F ${F/ガ/ga};done;
for F in ギ; do mv $F ${F/ギ/gi};done;
for F in グ; do mv $F ${F/グ/gu};done;
for F in ゲ; do mv $F ${F/ゲ/ge};done;
for F in ゴ; do mv $F ${F/ゴ/go};done;
for F in ザ; do mv $F ${F/ザ/za};done;
for F in ジ; do mv $F ${F/ジ/ji};done;
for F in ズ; do mv $F ${F/ズ/zu};done;
for F in ゼ; do mv $F ${F/ゼ/ze};done;
for F in ゾ; do mv $F ${F/ゾ/zo};done;
for F in ダ; do mv $F ${F/ダ/da};done;
for F in ヂ; do mv $F ${F/ヂ/ji};done;
for F in ズ; do mv $F ${F/ズ/zu};done;
for F in デ; do mv $F ${F/デ/de};done;
for F in ド; do mv $F ${F/ド/do};done;
for F in バ; do mv $F ${F/バ/ba};done;
for F in ビ; do mv $F ${F/ビ/bi};done;
for F in ブ; do mv $F ${F/ブ/bu};done;
for F in ベ; do mv $F ${F/ベ/be};done;
for F in ボ; do mv $F ${F/ボ/bo};done;
for F in パ; do mv $F ${F/パ/pa};done;
for F in ピ; do mv $F ${F/ピ/pi};done;
for F in プ; do mv $F ${F/プ/pu};done;
for F in ペ; do mv $F ${F/ペ/pe};done;
for F in ポ; do mv $F ${F/ポ/po};done;
for F in ア; do mv $F ${F/ア/a};done;
for F in イ; do mv $F ${F/イ/i};done;
for F in ウ; do mv $F ${F/ウ/u};done;
for F in エ; do mv $F ${F/エ/e};done;
for F in オ; do mv $F ${F/オ/o};done;
for F in カ; do mv $F ${F/カ/ka};done;
for F in キ; do mv $F ${F/キ/ki};done;
for F in ク; do mv $F ${F/ク/ku};done;
for F in ケ; do mv $F ${F/ケ/ke};done;
for F in コ; do mv $F ${F/コ/ko};done;
for F in サ; do mv $F ${F/サ/sa};done;
for F in シ; do mv $F ${F/シ/shi};done;
for F in ス; do mv $F ${F/ス/su};done;
for F in セ; do mv $F ${F/セ/se};done;
for F in ソ; do mv $F ${F/ソ/so};done;
for F in タ; do mv $F ${F/タ/ta};done;
for F in チ; do mv $F ${F/チ/chi};done;
for F in ツ; do mv $F ${F/ツ/tsu};done;
for F in テ; do mv $F ${F/テ/te};done;
for F in ト; do mv $F ${F/ト/to};done;
for F in ナ; do mv $F ${F/ナ/na};done;
for F in ニ; do mv $F ${F/ニ/ni};done;
for F in ヌ; do mv $F ${F/ヌ/nu};done;
for F in ネ; do mv $F ${F/ネ/ne};done;
for F in ノ; do mv $F ${F/ノ/no};done;
for F in ハ; do mv $F ${F/ハ/ha};done;
for F in ヒ; do mv $F ${F/ヒ/hi};done;
for F in フ; do mv $F ${F/フ/fu};done;
for F in ヘ; do mv $F ${F/ヘ/he};done;
for F in ホ; do mv $F ${F/ホ/ho};done;
for F in マ; do mv $F ${F/マ/ma};done;
for F in ミ; do mv $F ${F/ミ/mi};done;
for F in ム; do mv $F ${F/ム/mu};done;
for F in メ; do mv $F ${F/メ/me};done;
for F in モ; do mv $F ${F/モ/mo};done;
for F in ヤ; do mv $F ${F/ヤ/ya};done;
for F in ユ; do mv $F ${F/ユ/yu};done;
for F in ヨ; do mv $F ${F/ヨ/yo};done;
for F in ラ; do mv $F ${F/ラ/ra};done;
for F in リ; do mv $F ${F/リ/ri};done;
for F in ル; do mv $F ${F/ル/ru};done;
for F in レ; do mv $F ${F/レ/re};done;
for F in ロ; do mv $F ${F/ロ/ro};done;
for F in ワ; do mv $F ${F/ワ/wa};done;
for F in ヰ; do mv $F ${F/ヰ/wi};done;
for F in ヱ; do mv $F ${F/ヱ/we};done;
for F in ヲ; do mv $F ${F/ヲ/o};done;
for F in ン; do mv $F ${F/ン/n};done;
for F in ァ; do mv $F ${F/ァ/xa};done;
for F in ィ; do mv $F ${F/ィ/xi};done;
for F in ゥ; do mv $F ${F/ゥ/xu};done;
for F in ェ; do mv $F ${F/ェ/xe};done;
for F in ォ; do mv $F ${F/ォ/xo};done;
for F in ャ; do mv $F ${F/ャ/xya};done;
for F in ュ; do mv $F ${F/ュ/xyu};done;
for F in ョ; do mv $F ${F/ョ/xyo};done;
```

結合文字が入っていて濁点の入ってる文字がうまく変換できなかった。結合文字っていうのは、例えば、「が」を「か」「゛」　がくっついている。これを治すとしたら、下記になる。検索ワードで言うと「NFD」　とかになっている。


```txt:qiita.txt
for F in が; do mv $F ${F/が/ga};done;
for F in ぎ; do mv $F ${F/ぎ/gi};done;
for F in ぐ; do mv $F ${F/ぐ/gu};done;
for F in げ; do mv $F ${F/げ/ge};done;
for F in ご; do mv $F ${F/ご/go};done;
for F in ざ; do mv $F ${F/ざ/za};done;
for F in じ; do mv $F ${F/じ/ji};done;
for F in ず; do mv $F ${F/ず/zu};done;
for F in ぜ; do mv $F ${F/ぜ/ze};done;
for F in ぞ; do mv $F ${F/ぞ/zo};done;
for F in だ; do mv $F ${F/だ/da};done;
for F in ぢ; do mv $F ${F/ぢ/ji};done;
for F in づ; do mv $F ${F/づ/zu};done;
for F in で; do mv $F ${F/で/de};done;
for F in ど; do mv $F ${F/ど/do};done;
for F in ば; do mv $F ${F/ば/ba};done;
for F in び; do mv $F ${F/び/bi};done;
for F in ぶ; do mv $F ${F/ぶ/bu};done;
for F in べ; do mv $F ${F/べ/be};done;
for F in ぼ; do mv $F ${F/ぼ/bo};done;
for F in ぱ; do mv $F ${F/ぱ/pa};done;
for F in ぴ; do mv $F ${F/ぴ/pi};done;
for F in ぷ; do mv $F ${F/ぷ/pu};done;
for F in ぺ; do mv $F ${F/ぺ/pe};done;
for F in ぽ; do mv $F ${F/ぽ/po};done;
for F in あ; do mv $F ${F/あ/a};done;
for F in い; do mv $F ${F/い/i};done;
for F in う; do mv $F ${F/う/u};done;
for F in え; do mv $F ${F/え/e};done;
for F in お; do mv $F ${F/お/o};done;
for F in か; do mv $F ${F/か/ka};done;
for F in き; do mv $F ${F/き/ki};done;
for F in く; do mv $F ${F/く/ku};done;
for F in け; do mv $F ${F/け/ke};done;
for F in こ; do mv $F ${F/こ/ko};done;
for F in さ; do mv $F ${F/さ/sa};done;
for F in し; do mv $F ${F/し/shi};done;
for F in す; do mv $F ${F/す/su};done;
for F in せ; do mv $F ${F/せ/se};done;
for F in そ; do mv $F ${F/そ/so};done;
for F in た; do mv $F ${F/た/ta};done;
for F in ち; do mv $F ${F/ち/chi};done;
for F in つ; do mv $F ${F/つ/tsu};done;
for F in て; do mv $F ${F/て/te};done;
for F in と; do mv $F ${F/と/to};done;
for F in な; do mv $F ${F/な/na};done;
for F in に; do mv $F ${F/に/ni};done;
for F in ぬ; do mv $F ${F/ぬ/nu};done;
for F in ね; do mv $F ${F/ね/ne};done;
for F in の; do mv $F ${F/の/no};done;
for F in は; do mv $F ${F/は/ha};done;
for F in ひ; do mv $F ${F/ひ/hi};done;
for F in ふ; do mv $F ${F/ふ/fu};done;
for F in へ; do mv $F ${F/へ/he};done;
for F in ほ; do mv $F ${F/ほ/ho};done;
for F in ま; do mv $F ${F/ま/ma};done;
for F in み; do mv $F ${F/み/mi};done;
for F in む; do mv $F ${F/む/mu};done;
for F in め; do mv $F ${F/め/me};done;
for F in も; do mv $F ${F/も/mo};done;
for F in や; do mv $F ${F/や/ya};done;
for F in ゆ; do mv $F ${F/ゆ/yu};done;
for F in よ; do mv $F ${F/よ/yo};done;
for F in ら; do mv $F ${F/ら/ra};done;
for F in り; do mv $F ${F/り/ri};done;
for F in る; do mv $F ${F/る/ru};done;
for F in れ; do mv $F ${F/れ/re};done;
for F in ろ; do mv $F ${F/ろ/ro};done;
for F in わ; do mv $F ${F/わ/wa};done;
for F in ゐ; do mv $F ${F/ゐ/wi};done;
for F in ゑ; do mv $F ${F/ゑ/we};done;
for F in を; do mv $F ${F/を/o};done;
for F in ん; do mv $F ${F/ん/n};done;
for F in ぁ; do mv $F ${F/ぁ/xa};done;
for F in ぃ; do mv $F ${F/ぃ/xi};done;
for F in ぅ; do mv $F ${F/ぅ/xu};done;
for F in ぇ; do mv $F ${F/ぇ/xe};done;
for F in ぉ; do mv $F ${F/ぉ/xo};done;
for F in ゃ; do mv $F ${F/ゃ/xya};done;
for F in ゅ; do mv $F ${F/ゅ/xyu};done;
for F in ょ; do mv $F ${F/ょ/xyo};done;
for F in ガ; do mv $F ${F/ガ/ga};done;
for F in ギ; do mv $F ${F/ギ/gi};done;
for F in グ; do mv $F ${F/グ/gu};done;
for F in ゲ; do mv $F ${F/ゲ/ge};done;
for F in ゴ; do mv $F ${F/ゴ/go};done;
for F in ザ; do mv $F ${F/ザ/za};done;
for F in ジ; do mv $F ${F/ジ/ji};done;
for F in ズ; do mv $F ${F/ズ/zu};done;
for F in ゼ; do mv $F ${F/ゼ/ze};done;
for F in ゾ; do mv $F ${F/ゾ/zo};done;
for F in ダ; do mv $F ${F/ダ/da};done;
for F in ヂ; do mv $F ${F/ヂ/ji};done;
for F in ズ; do mv $F ${F/ズ/zu};done;
for F in デ; do mv $F ${F/デ/de};done;
for F in ド; do mv $F ${F/ド/do};done;
for F in バ; do mv $F ${F/バ/ba};done;
for F in ビ; do mv $F ${F/ビ/bi};done;
for F in ブ; do mv $F ${F/ブ/bu};done;
for F in ベ; do mv $F ${F/ベ/be};done;
for F in ボ; do mv $F ${F/ボ/bo};done;
for F in パ; do mv $F ${F/パ/pa};done;
for F in ピ; do mv $F ${F/ピ/pi};done;
for F in プ; do mv $F ${F/プ/pu};done;
for F in ペ; do mv $F ${F/ペ/pe};done;
for F in ポ; do mv $F ${F/ポ/po};done;
for F in ア; do mv $F ${F/ア/a};done;
for F in イ; do mv $F ${F/イ/i};done;
for F in ウ; do mv $F ${F/ウ/u};done;
for F in エ; do mv $F ${F/エ/e};done;
for F in オ; do mv $F ${F/オ/o};done;
for F in カ; do mv $F ${F/カ/ka};done;
for F in キ; do mv $F ${F/キ/ki};done;
for F in ク; do mv $F ${F/ク/ku};done;
for F in ケ; do mv $F ${F/ケ/ke};done;
for F in コ; do mv $F ${F/コ/ko};done;
for F in サ; do mv $F ${F/サ/sa};done;
for F in シ; do mv $F ${F/シ/shi};done;
for F in ス; do mv $F ${F/ス/su};done;
for F in セ; do mv $F ${F/セ/se};done;
for F in ソ; do mv $F ${F/ソ/so};done;
for F in タ; do mv $F ${F/タ/ta};done;
for F in チ; do mv $F ${F/チ/chi};done;
for F in ツ; do mv $F ${F/ツ/tsu};done;
for F in テ; do mv $F ${F/テ/te};done;
for F in ト; do mv $F ${F/ト/to};done;
for F in ナ; do mv $F ${F/ナ/na};done;
for F in ニ; do mv $F ${F/ニ/ni};done;
for F in ヌ; do mv $F ${F/ヌ/nu};done;
for F in ネ; do mv $F ${F/ネ/ne};done;
for F in ノ; do mv $F ${F/ノ/no};done;
for F in ハ; do mv $F ${F/ハ/ha};done;
for F in ヒ; do mv $F ${F/ヒ/hi};done;
for F in フ; do mv $F ${F/フ/fu};done;
for F in ヘ; do mv $F ${F/ヘ/he};done;
for F in ホ; do mv $F ${F/ホ/ho};done;
for F in マ; do mv $F ${F/マ/ma};done;
for F in ミ; do mv $F ${F/ミ/mi};done;
for F in ム; do mv $F ${F/ム/mu};done;
for F in メ; do mv $F ${F/メ/me};done;
for F in モ; do mv $F ${F/モ/mo};done;
for F in ヤ; do mv $F ${F/ヤ/ya};done;
for F in ユ; do mv $F ${F/ユ/yu};done;
for F in ヨ; do mv $F ${F/ヨ/yo};done;
for F in ラ; do mv $F ${F/ラ/ra};done;
for F in リ; do mv $F ${F/リ/ri};done;
for F in ル; do mv $F ${F/ル/ru};done;
for F in レ; do mv $F ${F/レ/re};done;
for F in ロ; do mv $F ${F/ロ/ro};done;
for F in ワ; do mv $F ${F/ワ/wa};done;
for F in ヰ; do mv $F ${F/ヰ/wi};done;
for F in ヱ; do mv $F ${F/ヱ/we};done;
for F in ヲ; do mv $F ${F/ヲ/o};done;
for F in ン; do mv $F ${F/ン/n};done;
for F in ァ; do mv $F ${F/ァ/xa};done;
for F in ィ; do mv $F ${F/ィ/xi};done;
for F in ゥ; do mv $F ${F/ゥ/xu};done;
for F in ェ; do mv $F ${F/ェ/xe};done;
for F in ォ; do mv $F ${F/ォ/xo};done;
for F in ャ; do mv $F ${F/ャ/xya};done;
for F in ュ; do mv $F ${F/ュ/xyu};done;
for F in ョ; do mv $F ${F/ョ/xyo};done;
```

全く同じじゃんって思うかもしれないけど、例えば「が」と「が」は同じように見えて違う。エディタによるけど、「が」をコピーしてdeleteで一文字消すと「か」になる。

こんなクソみたいなケースもあり得るのでご注意ください。普通に入力がわかんなかったのだけどjavascriptで無理矢理出力した

参考：
"が".normalize( "NFD" )　ってすると結合文字（２文字）
"が".normalize( "NFC" )ってすると普通の文字（1文字）