summaryrefslogtreecommitdiff
path: root/awk/files.awk
diff options
context:
space:
mode:
authorLeon Rische <leon.rische@me.com>2020-01-11 15:24:56 +0100
committerLeon Rische <leon.rische@me.com>2020-01-11 15:24:56 +0100
commit1c7838eb972ac365e648fc231620cb5f18a07788 (patch)
treed0a339cec50b9ecb468f2c7d380e3d3c37e85927 /awk/files.awk
Initial commit
Diffstat (limited to 'awk/files.awk')
-rw-r--r--awk/files.awk18
1 files changed, 18 insertions, 0 deletions
diff --git a/awk/files.awk b/awk/files.awk
new file mode 100644
index 0000000..6926408
--- /dev/null
+++ b/awk/files.awk
@@ -0,0 +1,18 @@
+BEGIN {
+ FS="|";
+}
+
+BEGINFILE {
+ has_card = 0;
+}
+
+# Flashcard headings
+/^\*+ .*:fc:.*$/ {
+ has_card = 1;
+}
+
+ENDFILE {
+ if (has_card == 1) {
+ print FILENAME;
+ }
+}