Merge branch 'dev' of github.com:plfa/plfa.github.io into dev

This commit is contained in:
wadler 2019-10-04 18:25:05 +01:00
commit b066c247c1

14
exercise.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
# Script to extract exercises from PLFA chapters, e.g., `src/plfa/part1/Naturals.lagda.md`.
# Usage:
#
# ./exercise.sh [SOURCE] [TARGET]
SRC="$1"
shift
DST="$1"
shift
awk '/^#/{flag=0} /^#### Exercise/{flag=1} flag' "$SRC" > "$DST"