Q:

Delete from the second occurrence of pattern block

Every line beginning with "  File:" and "Modify:"
I need to delete from the 2nd occurrence of "Modify" pattern in blocks of "Modify" lines.
Keeping the first occurrence of "Modify" in every "Modify block"
Based on this text
  File: /Music/David Bowe/1.mp3
Modify: 2010-11-24 09:36:33.000000000 -0200
Modify: 2016-04-13 11:32:58.692458900 -0300
  File: /Music/Music/David Bowe/Tom.mp3
Modify: 2010-10-22 11:12:15.000000000 -0200
  File: /Music/Music/David Bowe/Hero.mp3
Modify: 2010-10-26 07:21:56.000000000 -0200
Modify: 2017-04-13 11:32:58.282458400 -0300
  File: /Music/Music/David Bowe/AbsoluteBeginners.mp3
Modify: 2010-10-22 11:12:07.000000000 -0200
  File: /Music/Music/David Bowe/ImAfraidOfAmericans.mp3
Modify: 2011-11-13 08:54:57.000000000 -0200
Modify: 2015-04-13 11:32:58.732459000 -0300
Modify: 2016-04-13 11:32:58.692458900 -0300
Modify: 2016-01-01 21:18:53.348891500 -0200

I want get this result
  File: /Music/David Bowe/1.mp3
Modify: 2010-11-24 09:36:33.000000000 -0200
  File: /Music/Music/David Bowe/Tom.mp3
Modify: 2010-10-22 11:12:15.000000000 -0200
  File: /Music/Music/David Bowe/Hero.mp3
Modify: 2010-10-26 07:21:56.000000000 -0200
  File: /Music/Music/David Bowe/AbsoluteBeginners.mp3
Modify: 2010-10-22 11:12:07.000000000 -0200
  File: /Music/Music/David Bowe/ImAfraidOfAmericans.mp3
Modify: 2011-11-13 08:54:57.000000000 -0200

sed '/^Modify:/d' sample.txt doesn't work because I delete all occorrences of the pattern.
sed '/^Modify:/2,$d' sample.txt
trying to delete from the 2nd to the last occurrence doesn't work again (syntax error)

A:

This might work for you (GNU sed):
sed -n '/File/,/Modify/p' file

Turn off seds normal print-every-line and only print when specified. Print the range of lines between File and Modify, all other lines will not be printed.
A more robust solution:
sed -n '/^  File:/{N;/^Modify:/M!D;p}' file

Use the -n grep-like option. Match specific File: line, append the next line and match the specific Modify: line and if no match delete the first line and repeat, otherwise print both lines and repeat.
N.B. When the first line is deleted, seds normal processing is not followed. Because the pattern space is not empty, no next line is automatically read and cycle of commands begins as if it has been read already i.e. the second line that was appended with the N command, now becomes the first line in the pattern space and the first instruction to be executed is /^  File:/.

