文字コード一括変換のワンライナー(One Liner for changing text files' encodings)

Change all *.txt files to UTF-8 and UNIX LF.
すべての*.txtのファイルをutf-8とunix-lfに変えたファイルにする

for f in *.txt; do nkf -Lu -w "$f" > "${f%.txt}utf8.txt"; done


-Lu unix lf
-w utf-8

元データが必要なければ
for f in *.txt; do nkf -Lu -w --overwrite "$f"; done

Comments

Popular posts from this blog

Subclassing and Signal connect on a same widget crashes PySide application on exit.

Calling OpenCV functions via Cython from Python 3.X.

Showing CPU/Memory usage on tmux status bar(tmuxのステータスバーにCPUとMemoryの使用状況を表示する)