Created
March 20, 2019 18:28
-
-
Save louisthomas/fe6b922e88320bc570961303e784b5f7 to your computer and use it in GitHub Desktop.
You could set a "trap" to execute on exit or on a control-c to clean up. create a directory in which to place all my temporary files, and then immediately after, create an EXIT handler to clean up this directory when the script exits. https://stack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tempfile="$(mktemp)" | |
trap "rm -rf \"${tempfile}\"" EXIT | |
jq "..."> $tempfile && mv $tempfile ${CLUSTER_DEFINITION} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment