Created
October 7, 2019 04:04
-
-
Save terashim/c80af451a554b5dcbdf87cf6b730477d to your computer and use it in GitHub Desktop.
nkfコマンドの基本的な使い方
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # インストール | |
| brew install nkf | |
| # 元ファイル作成 | |
| echo 'こんにちは' > test.txt | |
| # 文字コードを調べる | |
| nkf -g test.txt | |
| # Shift JISに変換 | |
| nkf -s test.txt > test-sjis.txt | |
| # UTF-8に変換 | |
| nkf -u test-sjis.txt > test-utf8.txt | |
| # Shift JIS & CRLF に変換 | |
| nkf -s -Lw test.txt > test-sjis-crlf.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment