回答編集履歴

6

訂正

2018/01/25 12:50

投稿

nullpon
nullpon

スコア5737

test CHANGED
@@ -16,10 +16,10 @@
16
16
 
17
17
  追記
18
18
 
19
- JDKがインストールされているなら、以下でも変換出来ます。
19
+ JDKがインストールされているなら、以下でも変換出来ます。尚、JDK 1.9では以下のコマンドは廃止された模様。
20
20
 
21
21
  ```bash
22
22
 
23
- $ cat text.txt|$(JAVA_HOME)/bin/native2ascii -reverse > new.txt
23
+ $ cat text.txt|$JAVA_HOME/bin/native2ascii -reverse > new.txt
24
24
 
25
25
  ```

5

訂正

2018/01/25 12:50

投稿

nullpon
nullpon

スコア5737

test CHANGED
@@ -20,6 +20,6 @@
20
20
 
21
21
  ```bash
22
22
 
23
- $ cat text.txt|$(JAVA_HOME)/native2ascii -reverse > new.txt
23
+ $ cat text.txt|$(JAVA_HOME)/bin/native2ascii -reverse > new.txt
24
24
 
25
25
  ```

4

追記

2018/01/25 12:47

投稿

nullpon
nullpon

スコア5737

test CHANGED
@@ -11,3 +11,15 @@
11
11
  $ cat text.txt|sed -E 's/\u(....)/\&#x\1;/g'|nkf --numchar-input -w > new.txt
12
12
 
13
13
  ```
14
+
15
+
16
+
17
+ 追記
18
+
19
+ JDKがインストールされているなら、以下でも変換出来ます。
20
+
21
+ ```bash
22
+
23
+ $ cat text.txt|$(JAVA_HOME)/native2ascii -reverse > new.txt
24
+
25
+ ```

3

訂正

2018/01/25 12:45

投稿

nullpon
nullpon

スコア5737

test CHANGED
@@ -8,6 +8,6 @@
8
8
 
9
9
 
10
10
 
11
- $ cat text.txt|sed -E 's/\u(....)/\&#x\1;/g'|nkf --numchar-input > new.txt
11
+ $ cat text.txt|sed -E 's/\u(....)/\&#x\1;/g'|nkf --numchar-input -w > new.txt
12
12
 
13
13
  ```

2

訂正

2018/01/24 12:49

投稿

nullpon
nullpon

スコア5737

test CHANGED
@@ -8,6 +8,6 @@
8
8
 
9
9
 
10
10
 
11
- $ cat text.txt|nkf > new.txt
11
+ $ cat text.txt|sed -E 's/\u(....)/\&#x\1;/g'|nkf --numchar-input > new.txt
12
12
 
13
13
  ```

1

訂正

2018/01/24 12:16

投稿

nullpon
nullpon

スコア5737

test CHANGED
@@ -6,4 +6,8 @@
6
6
 
7
7
  $ sudo yum install nkf
8
8
 
9
+
10
+
11
+ $ cat text.txt|nkf > new.txt
12
+
9
13
  ```