回答編集履歴
1
mod
test
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
①
|
2
|
+
|
1
3
|
```sh
|
2
4
|
$ cat test.dat
|
3
5
|
20100010100000
|
@@ -17,3 +19,33 @@
|
|
17
19
|
> 20100000000
|
18
20
|
> 20100000101
|
19
21
|
```
|
22
|
+
|
23
|
+
②
|
24
|
+
|
25
|
+
```sh
|
26
|
+
$ cat test.dat
|
27
|
+
20100010100000
|
28
|
+
20100010100101
|
29
|
+
20100020100101
|
30
|
+
abcdef101xyzzz
|
31
|
+
|
32
|
+
$ sed -e 's/^\(......\)\(101\)\(.*\)/\2\1\3/' test.dat > test_.dat
|
33
|
+
|
34
|
+
$ cat test_.dat
|
35
|
+
10120100000000
|
36
|
+
10120100000101
|
37
|
+
20100020100101
|
38
|
+
101abcdefxyzzz
|
39
|
+
|
40
|
+
$ diff test.dat test_.dat
|
41
|
+
1,2c1,2
|
42
|
+
< 20100010100000
|
43
|
+
< 20100010100101
|
44
|
+
---
|
45
|
+
> 10120100000000
|
46
|
+
> 10120100000101
|
47
|
+
4c4
|
48
|
+
< abcdef101xyzzz
|
49
|
+
---
|
50
|
+
> 101abcdefxyzzz
|
51
|
+
```
|