Last active
August 29, 2015 14:26
-
-
Save jmatsu/e2a046be3917cc9585c4 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
file=$0 | |
output="output.file" | |
from_b=`tail -r ${file}|grep -n .|grep "#### template"|head -1|grep -o "[0-9]*"` | |
cat ${file}|tail -${from_b} > "${output}" | |
eval echo "\"$(cat ${output})\"" > "${output}" | |
// do something | |
exit 0 | |
#### template-begin(unique strings) | |
foo | |
bar | |
baz | |
\$file #will not be evaluated | |
$file #will be evaluated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment