cut 問題
[panshuai@localhost Documents]$ cat a.txt?
id name gender mark
1 aa f 80
2 bb f 81
3 cc f 82
4 dd f 83
id:name:gender:mark
5:ee:t:11
6:ff:t:12
7:gg:t:13
8:hh:t:14
[panshuai@localhost Documents]$ cut -f 3 a.txt?
gender
f
f
f
f
id:name:gender:mark
5:ee:t:11
6:ff:t:12
7:gg:t:13
8:hh:t:14
[panshuai@localhost Documents]$ cut -f 3 -d ":" a.txt?
id name gender mark
1 aa f 80
2 bb f 81
3 cc f 82
4 dd f 83
gender
t
t
t
t
[panshuai@localhost Documents]$?
為什么會出現這個情況?會多出那些不需要的行
2017-02-26
用tab鍵來分割不同列
2016-09-05
好吧,是把所有的東西看成第一列了