LoginSignup
6
3

More than 5 years have passed since last update.

AWS EC2にnkfをインストールする 2019-04-04版

Last updated at Posted at 2019-04-04

yumでinstallできないのでrpmからインストールします。

バイナリのダウンロード

https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/n/からnkfのパッケージを探してダウンロードしてください。

2019-04-04時点だと、nkf-2.1.3-5.el7.x86_64.rpmがあります。

URL https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/n/nkf-2.1.3-5.el7.x86_64.rpm

$ wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/n/nkf-2.1.3-5.el7.x86_64.rpm

インストール

以下のコマンドでインストールします。

$ sudo rpm -ivh nkf-2.1.3-5.el7.x86_64.rpm

改行コードの変換方法

dos -> unix は -Lu(unix)
unix -> dos は -Lw(win)
です。

$ nkf -Lu dos.txt > dos2unix.txt
$ nkf -Lw unix.txt > unix2dos.txt

※参考URL
AWS EC2にnkfをインストールする
色々な改行コード変換の方法
ありがとうございました。

6
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
3