awk can remove duplicates without sorting
Code:
awk '/notification_interval/ && s[$0]++==0' /usr/local/centreon/filesGeneration/nagiosCFG/1/serviceTemplates.cfg
In this case you can even minimize resources by utilizing awk's word splitting
Code:
awk '$1=="notification_interval" && s[$2]++==0' /usr/local/centreon/filesGeneration/nagiosCFG/1/serviceTemplates.cfg