How to update changed IP Address automatically?

Can you capture the output from the script when you run it at boot time?