Skip to content

Instantly share code, notes, and snippets.

@koki-h
Created February 6, 2020 02:24
Show Gist options
  • Save koki-h/740a221f6d91567183ceb76167574603 to your computer and use it in GitHub Desktop.
Save koki-h/740a221f6d91567183ceb76167574603 to your computer and use it in GitHub Desktop.
カレントディレクトリ内のcsvファイルをUTF-8からShift_JISへ変換
Dir.glob("./*.csv") do |f|
p f
`mv #{f} #{f}.bak`
`nkf -W -s #{f}.bak > #{f}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment