X-Git-Url: http://git.projectaon.org/?a=blobdiff_plain;f=common%2Fscripts%2Flist-bookcodes-all.sh;fp=common%2Fscripts%2Flist-bookcodes-all.sh;h=043835b8f815403e3ec4297dcd8e531b6e0c16f9;hb=c6338dc3c2d3299fdf71c128a7b707d7a69762dd;hp=0000000000000000000000000000000000000000;hpb=2bad6d7f32882c37e0ced713ce64832a519f4b47;p=project-aon.git diff --git a/common/scripts/list-bookcodes-all.sh b/common/scripts/list-bookcodes-all.sh new file mode 100755 index 0000000..043835b --- /dev/null +++ b/common/scripts/list-bookcodes-all.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# +# List all bookcodes. + +if [ ! -d "$AONDIR" ]; then + >&2 echo "Please set the AONDIR environment variable" + exit +fi + +book_db="$AONDIR/common/sqlite/bookcodes.db" + +sqlite3 -column -noheader "$book_db" "select book from bookcodes order by book"