- 论坛徽章:
- 0
|
我想提取这个txt文件中的每一行的一部分文本,请同学们帮忙,最好用sed/awk,谢谢!
goo.txt 如下:
[ERROR] 1 compare failed! tableName:mgmt_ip_track; xmlRowCount:29; dbRowCount:33
[ERROR] 2 db read failed! tableName:user_localusergroup; xmlRowCount:5; dbRowCount:0
[ERROR] 3 compare failed! tableName:hp_summary_page; xmlRowCount:5; dbRowCount:0
[ERROR] 4 db read failed! tableName:user_profile; xmlRowCount:4; dbRowCount:0
[ERROR] 5 compare failed! tableName s_object_version; xmlRowCount:8; dbRowCount:11
[ERROR] 6 compare failed! tableName:domain_name_item; xmlRowCount:1; dbRowCount:22
[ERROR] 7 compare failed! tableName:ah_userlogin_session; xmlRowCount:40336; dbRowCount:39559
[ERROR] 8 compare failed! tableName:network_service; xmlRowCount:49; dbRowCount:24970
[ERROR] 9 db read failed! tableName:hp_table_column; xmlRowCount:284; dbRowCount:0
[ERROR] 10 compare failed! tableName:radio_profile; xmlRowCount:21; dbRowCount:23
[ERROR] 11 compare failed! tableName:domain_order_key_info; xmlRowCount:32; dbRowCount:31
[ERROR] 12 compare failed! tableName:hp_profile_user_profile; xmlRowCount:11; dbRowCount:6
[ERROR] 13 compare failed! tableName:domain_object; xmlRowCount:1; dbRowCount:5
[ERROR] 14 compare failed! tableName:radius_on_hp_local_user_group; xmlRowCount:7; dbRowCount:5
[ERROR] 15 compare failed! tableName:mac_or_oui_item; xmlRowCount:11; dbRowCount:13
[ERROR] 16 compare failed! tableName:config_template_std; xmlRowCount:245; dbRowCount:374
我想到的结果是:每一行的“tableName:”这个后面的那个表名,并且要把后面的东西也去掉只要下面的结果。(也就是只要“:”后面和每行第一个”;“中间的数据。)
mgmt_ip_track
user_localusergroup
hp_summary_page
user_profile
os_object_version
domain_name_item
ah_userlogin_session
network_service
hp_table_column
radio_profile
domain_order_key_info
hp_profile_user_profile
domain_object
radius_on_hp_local_user_group
mac_or_oui_item
config_template_std
|
|