# move command definitions to separate file
mv -f %{_sysconfdir}/nrpe.d/commands.cfg{,.rpmnew}
grep '^command\[' %{_sysconfdir}/nrpe.cfg > %{_sysconfdir}/nrpe.d/commands.cfg
cp -f %{_sysconfdir}/nrpe.cfg{,.rpmsave}
sed -i -e '/^command\[/d' %{_sysconfdir}/nrpe.cfg
# move command definitions to separate file
mv -f %{_sysconfdir}/nrpe.d/commands.cfg{,.rpmnew}
grep '^command\[' %{_sysconfdir}/nrpe.cfg > %{_sysconfdir}/nrpe.d/commands.cfg
cp -f %{_sysconfdir}/nrpe.cfg{,.rpmsave}
sed -i -e '/^command\[/d' %{_sysconfdir}/nrpe.cfg