Created
August 1, 2018 00:03
-
-
Save iracooke/493f4c2b843e9f378d646e7720852ff4 to your computer and use it in GitHub Desktop.
BC3203 Patches
This file contains 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
BEGIN { in_q=0 } | |
/^```.*question_/ { | |
in_q=1; | |
match($0,"question_[a-z]*[0-9]+") | |
printf("%s(){\n",substr($0,RSTART,RLENGTH)); | |
} | |
/#Your answer here/ { | |
if (in_q){ | |
printf("\t%s\n","echo \"answer\"") | |
} | |
next; | |
} | |
!/```/{ | |
if (in_q){ | |
printf("\t%s\n",$0) | |
} | |
} | |
/^```$/{ | |
if (in_q){ | |
printf("}\n") | |
in_q=0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment