Tomlab 集合演算(shell)

デモデータdemo_1

$ cat demo_1 

0	0	1
0	0	1
0	0	1
0	0	0
1	0	1
1	0	1
1	0	1
1	1	1
0	0	1
0	0	1

any

$ cat demo_1 | awk '{print (/1/)?1:0}'

1
1
1
0
1
1
1
1
1
1

all

$ cat demo_1 | awk '{print (!/0/)?1:0}'

0
0
0
0
0
0
0
1
0
0

bit反転

$ cat demo_1 | tr 01 10

1	1	0
1	1	0
1	1	0
1	1	1
0	1	0
0	1	0
0	1	0
0	0	0
1	1	0
1	1	0