Skip to content

Instantly share code, notes, and snippets.

@iquiw
Last active August 20, 2020 23:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iquiw/5314d2ff5a621ab52fed4cab4338f149 to your computer and use it in GitHub Desktop.
Save iquiw/5314d2ff5a621ab52fed4cab4338f149 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -e
TMPOUT=$(mktemp /tmp/diag.XXXXXX)
trap 'rm "$TMPOUT"' 0 1 2 3 15
"/usr/bin/$1" -a -o "$TMPOUT" /dev/stdin
cat "$TMPOUT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment