Estou procurando uma solução para encontrar o par de padrões de pesquisa.
awk '/Schedule:/,/Retention Level:/' /tmp/data
Schedule: Full
Type: Full Backup
Calendar sched: Enabled
Included Dates-----------
Tuesday, Week 1
Tuesday, Week 2
Tuesday, Week 3
Tuesday, Week 4
Tuesday, Week 5
Excluded Dates----------
No specific exclude dates entered
No exclude days of week entered
Synthetic: 0
Checksum Change Detection: 0
PFI Recovery: 0
Maximum MPX: 4
Retention Level: 2 (3 weeks)
Schedule: INC
Type: Differential Incremental Backup
Calendar sched: Enabled
Included Dates-----------
Sunday, Week 1
Monday, Week 1
Wednesday, Week 1
Thursday, Week 1
Friday, Week 1
Saturday, Week 1
Sunday, Week 2
Monday, Week 2
Wednesday, Week 2
Thursday, Week 2
Friday, Week 2
Saturday, Week 2
Sunday, Week 3
Monday, Week 3
Wednesday, Week 3
Thursday, Week 3
Friday, Week 3
Saturday, Week 3
Sunday, Week 4
Monday, Week 4
Wednesday, Week 4
Thursday, Week 4
Friday, Week 4
Saturday, Week 4
Sunday, Week 5
Monday, Week 5
Wednesday, Week 5
Thursday, Week 5
Friday, Week 5
Saturday, Week 5
Excluded Dates----------
No specific exclude dates entered
No exclude days of week entered
PFI Recovery: 0
Maximum MPX: 4
Retention Level: 2 (3 weeks)
Acima é a entrada
A saída desejada é
Full Backup;Differential Incremental Backup , 3 weeks;3 weeks
Qual é o par de tipo e nível de retenção. Então, em cada tipo: existe um nível de retenção. Eu preciso de todos os pares na saída desejada.
Arquivo de entrada adicional no qual mais de dois pares de tipo e retenção estão disponíveis:
Schedule: Montlhy_Full
Type: Full Backup
Calendar sched: Enabled
Included Dates-----------
Wednesday, Week 3
Excluded Dates----------
No specific exclude dates entered
No exclude days of week entered
Synthetic: 0
Checksum Change Detection: 0
PFI Recovery: 0
Maximum MPX: 4
Retention Level: 5 (3 months)
Schedule: Weekly_Full
Type: Full Backup
Calendar sched: Enabled
Included Dates-----------
Wednesday, Week 1
Wednesday, Week 2
Wednesday, Week 4
Wednesday, Week 5
Excluded Dates----------
No specific exclude dates entered
No exclude days of week entered
Synthetic: 0
Checksum Change Detection: 0
PFI Recovery: 0
Maximum MPX: 4
Retention Level: 3 (1 month)
Schedule: Daily_Inc
Type: Differential Incremental Backup
Calendar sched: Enabled
Included Dates-----------
Sunday, Week 1
Monday, Week 1
Tuesday, Week 1
Thursday, Week 1
Friday, Week 1
Saturday, Week 1
Sunday, Week 2
Monday, Week 2
Tuesday, Week 2
Thursday, Week 2
Friday, Week 2
Saturday, Week 2
Sunday, Week 3
Monday, Week 3
Tuesday, Week 3
Thursday, Week 3
Friday, Week 3
Saturday, Week 3
Sunday, Week 4
Monday, Week 4
Tuesday, Week 4
Thursday, Week 4
Friday, Week 4
Saturday, Week 4
Sunday, Week 5
Monday, Week 5
Tuesday, Week 5
Thursday, Week 5
Friday, Week 5
Saturday, Week 5
Excluded Dates----------
No specific exclude dates entered
No exclude days of week entered
PFI Recovery: 0
Maximum MPX: 4
Retention Level: 2 (3 weeks)