Last active
November 12, 2016 15:37
-
-
Save navicore/870eda98e3b385d8486d9d4e9ef4592f to your computer and use it in GitHub Desktop.
bash eval crashing with parans
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 | |
| ATC_HOME="https://some.com/mydir" | |
| #text="say *hiya*" | |
| #text="say *hiya* to [this]" | |
| #text="say *hiya* to [this]\(stuff\)" | |
| text="~say~ *hiya* __to__ [this]\(${ATC_HOME}/stuff\)" | |
| echo "text:: $text" | |
| text=`eval echo $text` | |
| echo $text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment