Add this snippet at the top of your scripts to get a log of what they did, every time they run. This can help when writing new scripts or debugging something that fails after the fact.
I've used this a lot when building scripts to auto-configure hosts after booting. Capturing the output of these scripts can be awkward and it's valuable data to analyze what happened on a failed build, even days later.
No comments:
Post a Comment