From 36320d370729274783ea53aa5c6eea6da9a6c07f Mon Sep 17 00:00:00 2001 From: Erin Grant Date: Wed, 20 Feb 2019 16:36:48 -0800 Subject: [PATCH] added script to diff all.bib and readings.md --- diff_refs.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 diff_refs.sh diff --git a/diff_refs.sh b/diff_refs.sh new file mode 100755 index 0000000..2d7c509 --- /dev/null +++ b/diff_refs.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +bibtex=$(grep -o "{[a-z0-9]*," all.bib | cut -f2 -d"{" | cut -f1 -d"," | sort) +md=$(grep -o "\[@[a-z0-9]*" readings.md | cut -f2 -d"@" | sort) + +echo "The following are not common between all.bib and readings.md:" +echo "" +echo ${bibtex[@]} ${md[@]} | tr ' ' '\n' | sort | uniq -u