Remove a line from printers.conf file

I am looking to remove a line from /etc/cups/printers.conf file. In 10.04 when adding a printer through NoMachine a line gets added to the conf file called AuthInfoRequired username,password.

I am looking to make a script that will run as a cron to search for those lines in the conf file and remove them. I am pretty new to scripting and any help will be appreciated. I can do a grep on the file and pull the info, just having troubles on deleting the line.

Something like this?

grep -v 'AuthInfoRequired' /etc/cups/printers.conf > tempfile && mv tempfile /etc/cups/printers.conf

Works perfectly, thank you