本帖最后由 bikkuri 于 2020-07-16 07:41 编辑
大家好!
我有一个问题向大家请教,
有如下一个文本。
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h000006DVa3AAG/view" style3D"color:rgb(0,112,210); word-break:break-all">00332240</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h000006DVa3AAG/view" style3D"color:rgb(0,112,210); word-break:break-all">Inovasi Lintas Media - Fiberstar// Request graph snmp service on nokia 7550-SR</a>
- Indonesia
- <a href3D"https://nokia.lightning.force.com/lightning/r/0014100000RhiacAAB/view" style3D"color:rgb(0,112,210); word-break:break-all">PT INOVASI LINTAS MEDIA</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/0033h000008tZq5AAE/view" style3D"color:rgb(0,112,210); word-break:break-all">Chairudin Setiawan</a>
- 7/12/2020 6:46 PM
- 7/12/2020 8:00 PM
- 7
- <a href3D"https://nokia.lightning.force.com/lightning/r/0052M000009BySQQA0/view" style3D"color:rgb(0,112,210); word-break:break-all">Marugaobozu</a>
- Responded in Progress
- Open Violation
- Low
- Minor
- NSP (Network Services Platform)
- -
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h000005mj9EAAQ/view" style3D"color:rgb(0,112,210); word-break:break-all">00324914</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h000005mj9EAAQ/view" style3D"color:rgb(0,112,210); word-break:break-all">NFM-P Statistical Counter for Wavence Product</a>
- Malaysia
- <a href3D"https://nokia.lightning.force.com/lightning/r/0014100000LUkyoAAD/view" style3D"color:rgb(0,112,210); word-break:break-all">U MOBILE SDN BHD</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/0033h000007Xuh9AAC/view" style3D"color:rgb(0,112,210); word-break:break-all">Guruh Samodra</a>
- 7/6/2020 4:11 PM
- 7/6/2020 4:15 PM
- 154
- <a href3D"https://nokia.lightning.force.com/lightning/r/0052M000009BySQQA0/view" style3D"color:rgb(0,112,210); word-break:break-all">Marugaobozu</a>
- Responded in Progress
- Compliant
- Low
- Minor
- NSP (Network Services Platform)
- NFM-P (Network Functions Manager - Packet)
- -
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h00000625xqAAA/view" style3D"color:rgb(0,112,210); word-break:break-all">00329600</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h00000625xqAAA/view" style3D"color:rgb(0,112,210); word-break:break-all">License Creation</a>
- Australia
- <a href3D"https://nokia.lightning.force.com/lightning/r/0014100000LUkiTAAT/view" style3D"color:rgb(0,112,210); word-break:break-all">SA POWER NETWORKS</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/0033h000009t7wQAAQ/view" style3D"color:rgb(0,112,210); word-break:break-all">Madhan K</a>
- 7/7/2020 9:12 AM
- 7/9/2020 2:34 PM
- 137
- <a href3D"https://nokia.lightning.force.com/lightning/r/0052M000009BySQQA0/view" style3D"color:rgb(0,112,210); word-break:break-all">Marugaobozu</a>
- Pending Customer
- -
- Low
- Minor
- 5620 SAM (Service Aware Manager)
- -
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h000005Hxk4AAC/view" style3D"color:rgb(0,112,210); word-break:break-all">00317443</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h000005Hxk4AAC/view" style3D"color:rgb(0,112,210); word-break:break-all">NSP 19.9 All Wavences Radio NE capacity License in the Umobile network.</a>
- Malaysia
- <a href3D"https://nokia.lightning.force.com/lightning/r/0014100000LUkyoAAD/view" style3D"color:rgb(0,112,210); word-break:break-all">U MOBILE SDN BHD</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/0033h000007Xuh9AAC/view" style3D"color:rgb(0,112,210); word-break:break-all">Guruh Samodra</a>
- 6/25/2020 3:30 PM
- 6/25/2020 3:32 PM
- 418
- <a href3D"https://nokia.lightning.force.com/lightning/r/0052M000009BySQQA0/view" style3D"color:rgb(0,112,210); word-break:break-all">Marugaobozu</a>
- Pending Customer
- Compliant
- Medium
- Major
- NSP (Network Services Platform)
- NFM-P (Network Functions Manager - Packet)
- NSPD-260050
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h000005fHlQAAU/view" style3D"color:rgb(0,112,210); word-break:break-all">00320535</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h000005fHlQAAU/view" style3D"color:rgb(0,112,210); word-break:break-all">NFM-P Switchover's long time more than 45 minutes (Calculate from user can access to NFM-P GUI)</a>
- Thailand
- <a href3D"https://nokia.lightning.force.com/lightning/r/0014100000LUo6bAAD/view" style3D"color:rgb(0,112,210); word-break:break-all">TRUE INTERNET CORPORATION COMPANY LIMITED</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/0033h000009I74tAAC/view" style3D"color:rgb(0,112,210); word-break:break-all">Patisamphitha Atthangkikamak</a>
- 6/30/2020 3:48 PM
- 7/1/2020 3:06 PM
- 298
- <a href3D"https://nokia.lightning.force.com/lightning/r/0052M000009BySQQA0/view" style3D"color:rgb(0,112,210); word-break:break-all">Marugaobozu</a>
- Pending Customer
- -
- Medium
- Major
- NSP (Network Services Platform)
- NFM-P (Network Functions Manager - Packet)
- -
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h000005fBPAAA2/view" style3D"color:rgb(0,112,210); word-break:break-all">00320485</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/5003h000005fBPAAA2/view" style3D"color:rgb(0,112,210); word-break:break-all">[Customer/Major] CMG Measurement Missing</a>
- Indonesia
- <a href3D"https://nokia.lightning.force.com/lightning/r/0014100000LUkfCAAT/view" style3D"color:rgb(0,112,210); word-break:break-all">PT HUTCHISON 3 INDONESIA</a>
- <a href3D"https://nokia.lightning.force.com/lightning/r/0033h000003M8a0AAC/view" style3D"color:rgb(0,112,210); word-break:break-all">H3I FO Core</a>
- 6/30/2020 12:05 PM
- 6/30/2020 12:09 PM
- 302
- <a href3D"https://nokia.lightning.force.com/lightning/r/0052M000009BySQQA0/view" style3D"color:rgb(0,112,210); word-break:break-all">Marugaobozu</a>
- Responded in Progress
- Compliant
- Medium
- Major
- NSP (Network Services Platform)
- NFM-P (Network Functions Manager - Packet)
- -
复制代码
希望用awk做以下处理:
1. 去除html内容:将<a href...>和</a>去掉,只显示夹在中间的内容,比如第一行处理后仅显示:00332240;
2. 缺项补空:每一组数据由16行内容组成,以仅含有一个8位数字的行开头,后面紧接着的15行是属性行;
但是有时候倒数第二行会丢失,使得有的数据块有16行,有的只有15行;
希望对于只有15行的数据块在倒数第二行的位置插入一个空行补足16行。
例如:第一个数据块就只有15行,希望处理后显示为:
######################分割线###################### 00332240
Inovasi Lintas Media - Fiberstar// Request graph snmp service on nokia 7550-SR
Indonesia
PT INOVASI LINTAS MEDIA
Chairudin Setiawan
7/12/2020 6:46 PM
7/12/2020 8:00 PM
7
Marugaobozu
Responded in Progress
Open Violation
Low
Minor
NSP (Network Services Platform)
-
######################分割线######################
谢谢大家的指点和帮助。
|