Created
November 12, 2016 15:56
-
-
Save navicore/770dc3f4bf99fbeb517fa7713a844cca to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| set -e | |
| exec 3>&1 | |
| exec 1>&2 | |
| set -x | |
| ATC_HOME="https://some.com/mydir" | |
| payload=$(mktemp /tmp/resource-in.XXXXXX) | |
| cat > "${payload}" <&0 | |
| text="$(jq -r '.params.text' < "${payload}")" | |
| # escape ( and ) | |
| text="${text//\(/\\(}" | |
| text="${text//\)/\\)}" | |
| text=`eval echo $text` | |
| echo "final text: $text" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment