summaryrefslogtreecommitdiff
path: root/awk/files.awk
diff options
context:
space:
mode:
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;
+ }
+}