- 论坛徽章:
- 60
|
回复 3# bikkuri
那就改一下,不要用 -F,
用 FPAT 这个内置变量,指定字段的内容,需 gawk 4.0+ 版本
[root@hk tmp]# cat file1
"Support Ticket Number","Subject","Country","Account Name","Contact Name","Date/Time Opened","Assigned Date/Time","Age (Hours)","Support Ticket Owner","Reason for Internal Status","Status","Milestone Status","Assessed Priority","Severity","Product Name","Product Variant Name","Related Cases Reference Number"
"00232281","Why there is PmFileNotificationMissing alarm on NSP? How to clean it permanently","Myanmar","OOREDOO MYANMAR LIMITED","Sareth Mak","2/7/2020 11:36 AM","2/7/2020 11:50 AM","1446.0000000000","Bozu Marugao","Bozu Marugao","Completed","","Medium","Major","NSP (Network Services Platform)","NFM-P (Network Functions Manager - Packet)","NSPD-251444"
"00237425","We have an issue February 11, 2020 measurement missing at G2102 & G 2103 (CMG file) around 00 - 01 AM, we try to backup manually data file to NSP but cannot generate and result blank (as attached). Is it any other work around to recovery this issue?","Indonesia","PT HUTCHISON 3 INDONESIA","Amin Susmanto","2/12/2020 10:20 AM","2/12/2020 11:01 AM","1330.0000000000","Bozu Marugao","Bozu Marugao","Completed","Closed Violation","Low","Major","NSP (Network Services Platform)","NFM-P (Network Functions Manager - Packet)",""
[root@hk tmp]#
[root@hk tmp]#
[root@hk tmp]# awk 'BEGIN{FPAT="\"[^\"]*\""}NR>1{for(i=1;i<=NF;i++)print substr($i,2,length($i)-2) }' file1
00232281
Why there is PmFileNotificationMissing alarm on NSP? How to clean it permanently
Myanmar
OOREDOO MYANMAR LIMITED
Sareth Mak
2/7/2020 11:36 AM
2/7/2020 11:50 AM
1446.0000000000
Bozu Marugao
Bozu Marugao
Completed
Medium
Major
NSP (Network Services Platform)
NFM-P (Network Functions Manager - Packet)
NSPD-251444
00237425
We have an issue February 11, 2020 measurement missing at G2102 & G 2103 (CMG file) around 00 - 01 AM, we try to backup manually data file to NSP but cannot generate and result blank (as attached). Is it any other work around to recovery this issue?
Indonesia
PT HUTCHISON 3 INDONESIA
Amin Susmanto
2/12/2020 10:20 AM
2/12/2020 11:01 AM
1330.0000000000
Bozu Marugao
Bozu Marugao
Completed
Closed Violation
Low
Major
NSP (Network Services Platform)
NFM-P (Network Functions Manager - Packet)
[root@hk tmp]#
|
|