Last active
September 17, 2019 09:50
-
-
Save djptek/ff478ef65a7e03d07c11f363ead3383e to your computer and use it in GitHub Desktop.
asciidoc to solution
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
#!/bin/bash | |
mkdir -p ../solutions | |
cat lab[1-4].asciidoc | sed -E "s/^\[\[(lab_[1-4])\]\]/### \1 ###/" | sed -e "s/^+$/#/" | grep -v "^[[+\.|-]" | grep -v "link:\|image:\|include:" | grep -e "^PUT\|^GET\|^DELETE\|^POST\|^#\|^[ ]*[{}\",]\|^ [ ]*[-0-9]\|\[\|\]\|ctx\." | sed '$!N; /^\(.*\)\n\1$/!P; D' > ../solutions/labs_1-4_solutions.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment