Helpers for writing command line scripts.