Skip to content

Instantly share code, notes, and snippets.

@goodmami
Last active August 29, 2015 14:16
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 goodmami/fe24b918a84fc805c6ac to your computer and use it in GitHub Desktop.
Save goodmami/fe24b918a84fc805c6ac to your computer and use it in GitHub Desktop.
Make a [incr tsdb()] preference file with a specific result ID.
#!/bin/bash
if [ $# -ne 2 ]; then
echo 'usage: make-preference.sh PROFILE RESULT-ID'
exit 1
fi
awk -F@ -v RES="$2" \
'{ if($2 == RES) { printf("%d@-1@%d\n", $1, $2) } }' \
< "$1"/result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment